![]() |
DEPRECATED: Diffusion Silverlight Classic API
5.9.4
|
The interface for the DiffusionClient class. More...
Public Member Functions | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
void | AddServerDetails (ServerDetails details) |
Adds the details of a Diffusion connection descriptor. More... | |
void | ClearServerDetails () |
Clears the server details. More... | |
int | AddTopicListener (string pattern, Func< TopicMessage, bool > function, object context) |
Adds a topic listener. More... | |
void | RemoveTopicListener (int handle) |
Removes a topic listener. More... | |
void | RemoveAllTopicListeners () |
Removes all topic listeners. More... | |
void | Connect (ConnectionDetails connectionDetails=null) |
Connect to the Diffusion server using the specified connection details. The connection details can either be passed in, or a default set will be used. More... | |
void | Reconnect () |
Attempts to re-establish a connection to the Diffusion server. More... | |
void | Close () |
Closes down gracefully and disconnects from the Diffusion server. More... | |
void | SendTopicMessage (TopicMessage message) |
Sends a topic message with no encoding to the Diffusion server. More... | |
void | SendTopicMessageEncrypted (TopicMessage message) |
Sends a topic message to the Diffusion server and encrypts it automatically prior to sending to Diffusion. More... | |
void | SendTopicMessageCompressed (TopicMessage message) |
Sends a topic message to the Diffusion server and compresses it automatically prior to sending to Diffusion. More... | |
void | SendTopicMessageBase64 (TopicMessage message) |
Sends a Base64 encoded topic message to the Diffusion server and Base64 encodes it automatically prior to sending to Diffusion. More... | |
void | Send (string topic, string message) |
Sends a message to a particular topic. More... | |
void | Subscribe (string topics) |
Subscribes to topics (multiple topics should be comma-delimited) More... | |
void | Unsubscribe (string topics) |
Unsubscribe from topics (multiple topics should be comma-delimited). More... | |
void | Ping (string timeStamp, string queueSize) |
Send a ping request to the Diffusion server; the server will respond with a ping message. More... | |
void | SendCredentials (DiffusionClientCredentials credentials) |
Sends the credentials to the Diffusion server. If the credentials are rejected by the server, a DiffusionEventBus.ServerRejectedCredentials event will be fired. More... | |
void | Acknowledge (TopicMessage message) |
Sends a message acknowledgement back to the Diffusion server if auto acknowledgements are not enabled. More... | |
void | SendAckResponse (string ackId) |
Used to manually send an acknowledgement message to the Diffusion server. More... | |
void | RaiseTraceDebugMessage (object sender, string message) |
Routes an internal 'debug' message to subscribers. More... | |
void | Fetch (string topic, params string[] headers) |
ServiceTopicHandler | CreateServiceTopicHandler (TopicMessage message, IServiceTopicListener listener) |
Creates a handler object for a 'Service' topic. More... | |
PagedTopicHandler | CreatePagedTopicHandler (TopicMessage message, IPagedTopicListener listener) |
Creates a handler object for a 'Paged' topic. More... | |
Properties | |
bool | IsConnected [get] |
Returns the connection state of the active transport. More... | |
string | ClientId [get] |
Returns the client id of the active transport. More... | |
int | ServerProtocolVersion [get] |
Returns the server protocol version. More... | |
string | Host [get, set] |
Get/set the host or IP address of the Diffusion server that the Diffusion client will try to connect to if using the Socket transport. More... | |
int | Port [get, set] |
Get/set the port of the Diffusion server that the Diffusion client will try to connect to if using the Socket transport. More... | |
string | Topics [get, set] |
Get/set the topics to connect to the Diffusion server with. More... | |
string | Url [get, set] |
Get/set the url which will be used if the Http transport is to be used. The /diffusion context will be automatically added. More... | |
TransportType | TransportType [get, set] |
Get/set the current transport mode. If connected this will reflect which transport type is being used in the current session with the Diffusion server. More... | |
DiffusionClientCredentials | Credentials [get, set] |
Get/set the credentials which will be used in the connection to the Diffusion server. More... | |
bool | IsHandlingAcks [get, set] |
Sets whether message acknowledgement is automatic (true) or manual (false). More... | |
bool | AutoAck [get, set] |
Get/set whether the API automatically sends message acknowledgements back to the Diffusion server. More... | |
int | ClientProtocolVersion [get] |
Returns the client protocol version. More... | |
int | TransportTimeout [get, set] |
Gets/sets the transport timeout. More... | |
NetworkStackType | StackType [get, set] |
Get/set the networking stack to use. More... | |
string | ServerContext [get, set] |
Get/set the http context of the Diffusion server. Defaults to '/diffusion/'. More... | |
int | HttpConnectivityMonitorFrequency [get, set] |
The frequency at which to monitor http connectivity. More... | |
bool | AutoFailover [get, set] |
Get/set whether to set the 'auto failover' option. More... | |
bool | IsLoadBalancing [get, set] |
Get/set whether we will be load-balancing the connection attempts. More... | |
bool | RestoreState [get, set] |
Get/set whether to attempt to restore the state, i.e. topic subscriptions etc. after a loss of connection and subsequent reconnection. More... | |
bool | Cascade [get, set] |
Get/set whether to cycle through all connection details to attempt to establish a connection to the Diffusion server. More... | |
ServerDetails | ActiveServerDetails [get] |
Get the server details that are currently being used for connection to Diffusion. More... | |
DateTime | LastInteraction [get] |
Returns the time of the last interaction (send or receive) with the Diffusion server. More... | |
Events | |
EventHandler < TopicMessageEventArgs > | MessageReceived |
The event fired when a message is received from the Diffusion server. More... | |
EventHandler < DiffusionConnectionStatusEventArgs > | ConnectionStatus |
The event fired when the connection status to the Diffusion server changes. More... | |
EventHandler < TopicMessageEventArgs > | ServerRejectedCredentials |
The event fired when the Diffusion server has rejected credentials. More... | |
EventHandler < MessageNotAcknowledgedEventArgs > | MessageNotAcknowledged |
The event fired when a message has not been acknowledged by the Diffusion server. More... | |
EventHandler < AckResponseMessageEventArgs > | AckMessageReceived |
The event fired when an acknowledgement received message is received from the Diffusion server. More... | |
EventHandler < TraceMessageEventArgs > | DiffusionTraceEvent |
The event fired when 'debug' information is sent. More... | |
EventHandler < TopicStatusMessageEventArgs > | TopicStatusMessageReceived |
The event fired when a topic status message is received. More... | |
EventHandler < ConnectionDetailsAcquiredEventArgs > | ConnectionDetailsAcquired |
The event fired when a set of server details has been acquired prior to a connection attempt. More... | |
EventHandler< EventArgs > | ConnectionSequenceExhausted |
The event fired when the sequence of connection details has been exhausted. More... | |
The interface for the DiffusionClient class.
void PushTechnology.Transports.IDiffusionClient.Acknowledge | ( | TopicMessage | message | ) |
Sends a message acknowledgement back to the Diffusion server if auto acknowledgements are not enabled.
message |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.AddServerDetails | ( | ServerDetails | details | ) |
Adds the details of a Diffusion connection descriptor.
details |
Implemented in PushTechnology.Transports.DiffusionClient.
int PushTechnology.Transports.IDiffusionClient.AddTopicListener | ( | string | pattern, |
Func< TopicMessage, bool > | function, | ||
object | context | ||
) |
Adds a topic listener.
pattern | |
function | |
context |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.ClearServerDetails | ( | ) |
Clears the server details.
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Close | ( | ) |
Closes down gracefully and disconnects from the Diffusion server.
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Connect | ( | ConnectionDetails | connectionDetails = null | ) |
Connect to the Diffusion server using the specified connection details. The connection details can either be passed in, or a default set will be used.
Implemented in PushTechnology.Transports.DiffusionClient.
PagedTopicHandler PushTechnology.Transports.IDiffusionClient.CreatePagedTopicHandler | ( | TopicMessage | message, |
IPagedTopicListener | listener | ||
) |
Creates a handler object for a 'Paged' topic.
This would be called in response to receiving an 'IsPagedLoad' message from a paged topic as a result of subscribing to it. Note that no other messages would be received from a service topic other than via the specified IPagedTopicListener.
message | The load message received from the topic. |
listener | An object that is to receive all notifications from the Topic. |
Implemented in PushTechnology.Transports.DiffusionClient.
ServiceTopicHandler PushTechnology.Transports.IDiffusionClient.CreateServiceTopicHandler | ( | TopicMessage | message, |
IServiceTopicListener | listener | ||
) |
Creates a handler object for a 'Service' topic.
This would be called in response to receiving an 'IsServiceLoad' message from a service topic as a result of subscribing to it. Note that no other messages would be received from a service topic other than via the specified IServiceTopicListener.
message | The load message received from the topic. |
listener | An object that is to receive all Service replies and notifications. |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Fetch | ( | string | topic, |
params string[] | headers | ||
) |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Ping | ( | string | timeStamp, |
string | queueSize | ||
) |
Send a ping request to the Diffusion server; the server will respond with a ping message.
timeStamp | |
queueSize |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.RaiseTraceDebugMessage | ( | object | sender, |
string | message | ||
) |
Routes an internal 'debug' message to subscribers.
sender | |
message |
summary> Send a 'fetch' message to the Diffusion server; the server may respond with a fetch response. /summary> param name="topic">
param name="headers">
exception cref="UnsupportedServerMethodException">
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Reconnect | ( | ) |
Attempts to re-establish a connection to the Diffusion server.
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.RemoveAllTopicListeners | ( | ) |
Removes all topic listeners.
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.RemoveTopicListener | ( | int | handle | ) |
Removes a topic listener.
handle |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Send | ( | string | topic, |
string | message | ||
) |
Sends a message to a particular topic.
topic | |
message |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.SendAckResponse | ( | string | ackId | ) |
Used to manually send an acknowledgement message to the Diffusion server.
ackId |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.SendCredentials | ( | DiffusionClientCredentials | credentials | ) |
Sends the credentials to the Diffusion server. If the credentials are rejected by the server, a DiffusionEventBus.ServerRejectedCredentials event will be fired.
credentials |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.SendTopicMessage | ( | TopicMessage | message | ) |
Sends a topic message with no encoding to the Diffusion server.
message |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.SendTopicMessageBase64 | ( | TopicMessage | message | ) |
Sends a Base64 encoded topic message to the Diffusion server and Base64 encodes it automatically prior to sending to Diffusion.
message |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.SendTopicMessageCompressed | ( | TopicMessage | message | ) |
Sends a topic message to the Diffusion server and compresses it automatically prior to sending to Diffusion.
message |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.SendTopicMessageEncrypted | ( | TopicMessage | message | ) |
Sends a topic message to the Diffusion server and encrypts it automatically prior to sending to Diffusion.
message |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Subscribe | ( | string | topics | ) |
Subscribes to topics (multiple topics should be comma-delimited)
topics |
Implemented in PushTechnology.Transports.DiffusionClient.
void PushTechnology.Transports.IDiffusionClient.Unsubscribe | ( | string | topics | ) |
Unsubscribe from topics (multiple topics should be comma-delimited).
topics |
Implemented in PushTechnology.Transports.DiffusionClient.
|
get |
Get the server details that are currently being used for connection to Diffusion.
|
getset |
Get/set whether the API automatically sends message acknowledgements back to the Diffusion server.
If true, message acknowledgements will be sent automatically, otherwise the developer will have to manually respond to the acknowledge message via the IDiffusionTransport.Acknowlege() method.
|
getset |
Get/set whether to set the 'auto failover' option.
By default when a connection is lost then notification is given and the connection simply closed. However, if 'auto failover' is specified then if a connection is lost then an automatic attempt will be made to connect using the next server details (assuming more than one was provided).
|
getset |
Get/set whether to cycle through all connection details to attempt to establish a connection to the Diffusion server.
|
get |
Returns the client id of the active transport.
|
get |
Returns the client protocol version.
|
getset |
Get/set the credentials which will be used in the connection to the Diffusion server.
|
getset |
Get/set the host or IP address of the Diffusion server that the Diffusion client will try to connect to if using the Socket transport.
|
getset |
The frequency at which to monitor http connectivity.
|
get |
Returns the connection state of the active transport.
|
getset |
Sets whether message acknowledgement is automatic (true) or manual (false).
|
getset |
Get/set whether we will be load-balancing the connection attempts.
|
get |
Returns the time of the last interaction (send or receive) with the Diffusion server.
|
getset |
Get/set the port of the Diffusion server that the Diffusion client will try to connect to if using the Socket transport.
|
getset |
Get/set whether to attempt to restore the state, i.e. topic subscriptions etc. after a loss of connection and subsequent reconnection.
|
getset |
Get/set the http context of the Diffusion server. Defaults to '/diffusion/'.
|
get |
Returns the server protocol version.
|
getset |
Get/set the networking stack to use.
|
getset |
Get/set the topics to connect to the Diffusion server with.
|
getset |
Gets/sets the transport timeout.
|
getset |
Get/set the current transport mode. If connected this will reflect which transport type is being used in the current session with the Diffusion server.
|
getset |
Get/set the url which will be used if the Http transport is to be used. The /diffusion context will be automatically added.
EventHandler<AckResponseMessageEventArgs> PushTechnology.Transports.IDiffusionClient.AckMessageReceived |
The event fired when an acknowledgement received message is received from the Diffusion server.
EventHandler<ConnectionDetailsAcquiredEventArgs> PushTechnology.Transports.IDiffusionClient.ConnectionDetailsAcquired |
The event fired when a set of server details has been acquired prior to a connection attempt.
EventHandler<EventArgs> PushTechnology.Transports.IDiffusionClient.ConnectionSequenceExhausted |
The event fired when the sequence of connection details has been exhausted.
EventHandler<DiffusionConnectionStatusEventArgs> PushTechnology.Transports.IDiffusionClient.ConnectionStatus |
The event fired when the connection status to the Diffusion server changes.
EventHandler<TraceMessageEventArgs> PushTechnology.Transports.IDiffusionClient.DiffusionTraceEvent |
The event fired when 'debug' information is sent.
EventHandler<MessageNotAcknowledgedEventArgs> PushTechnology.Transports.IDiffusionClient.MessageNotAcknowledged |
The event fired when a message has not been acknowledged by the Diffusion server.
EventHandler<TopicMessageEventArgs> PushTechnology.Transports.IDiffusionClient.MessageReceived |
The event fired when a message is received from the Diffusion server.
EventHandler<TopicMessageEventArgs> PushTechnology.Transports.IDiffusionClient.ServerRejectedCredentials |
The event fired when the Diffusion server has rejected credentials.
EventHandler<TopicStatusMessageEventArgs> PushTechnology.Transports.IDiffusionClient.TopicStatusMessageReceived |
The event fired when a topic status message is received.