![]() |
DEPRECATED: Diffusion .NET Classic API - External Client
5.9.4
|
Provides an External Client Connection to a Diffusion Server. More...
Public Member Functions | |
void | Connect () |
Connects to the server without subscribing to any topics. More... | |
void | Connect (EventHandler< MessageEventArgs< TopicMessageImpl >> successEvent, EventHandler< ServerClosedEventArgs > failureEvent, EventHandler< ServerClosedEventArgs > disconnectedEvent, EventHandler< MessageEventArgs< TopicMessageImpl >> messageReceivedEvent) |
Attempts to establish a connection to a Diffusion server with callbacks. More... | |
void | Disconnect () |
Closes the connection to the Diffusion Server. More... | |
void | Reconnect () |
Attempts to re-establish a connection to a Diffusion server. More... | |
ExternalClient (ConnectionCapabilities capabilities) | |
Constructor. More... | |
ExternalClient () | |
Default constructor. More... | |
ExternalClient (IConnectionDetails connectionDetails) | |
Construct a client connection object. More... | |
ExternalClient (IServerConnectionListener listener, IConnectionDetails connectionDetails) | |
Construct a client connection object. More... | |
ExternalClient (IServerDetails serverDetails) | |
Constructs a client connection object. This is a convenience constructor that automatically creates the IConnectionDetails from the IServerDetails object. The connection object is created but not connected until the Connect( TopicSet ) method is invoked. Initial topics to subscribe to may be specified on the server details or on connection. More... | |
ExternalClient (IServerDetails[] serverDetails) | |
Constructs a client connection object. This is a convenience constructor that automatically creates the IConnectionDetails from the IServerDetails list. The connection object is created but not connected until the Connect( TopicSet ) method is invoked. Initial topics to subscribe to may be specified on the server details or on connection. More... | |
ExternalClient (IServerConnectionListener listener, IServerDetails serverDetails) | |
Constructs a client connection object. This is a convenience constructor that automatically creates the IConnectionDetails from the specified list of IServerDetails. The connection object is created but not connected until the Connect( TopicSet ) method is invoked. The specified IServerConnectionListener will receive all notifications. Initial topics to subscribe to may be specified on the server details or on connection. More... | |
ExternalClient (IServerConnectionListener listener, string[] urls) | |
Convenience constructor which allows IConnectionDetails to be automatically created from one or more urls. More... | |
void | Connect (string[] topics) |
Connects to the server. This is effectively the same as calling Connect( TopicSet ), specifying a TopicSet constructed from the topic list. More... | |
void | Connect (TopicSet topics) |
Connects to the server. If this is called when already connected then the supplied topics will simply be subscribed. More... | |
void | Close () |
Closes the connection to the Diffusion server. More... | |
void | AddGlobalTopicListener (ITopicListener listener) |
Adds a 'global' topic listener, i.e. one that listens to all topics. More... | |
void | AddTopicListener (Action< TopicMessageImpl > listener, TopicSet topics, Regex topicRegex) |
Adds a topic listener. More... | |
void | AddTopicListener (ITopicListener listener, TopicSet topics) |
Adds a topic listener. More... | |
void | AddTopicListener (ITopicListener listener, params string[] topics) |
Adds a topic listener. More... | |
void | AddServerConnectionListener (IServerConnectionListener listener) |
Adds a server connection listener with an interface method. More... | |
void | RemoveTopicListener (ITopicListener listener) |
Remove a topic listener. More... | |
IServiceTopicHandler | CreateServiceTopicHandler (ITopicMessage message, IServiceTopicListener listener) |
Creates a handler object for a 'service' topic. This would be called in response to receiving an ITopicMessage.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. More... | |
IPagedTopicHandler | CreatePagedTopicHandler (ITopicMessage message, IPagedTopicListener listener) |
Adds a handler object for a 'paged' Topic. This would be called in response to receiving an ITopicMessage.IsPagedLoad message from a paged topic as a result of subscribing to it. Note that no other messages would be received from a paged topic until the returned handler is used to IPagedTopicHandler.Open( int, int ) the topic. More... | |
ITopicNotifyTopicHandler | CreateTopicNotifyTopicHandler (ITopicMessage message, ITopicNotifyTopicListener listener) |
Creates a handler for a 'topic notify' topic. This would be called in response to receiving an ITopicMessage.IsTopicNotifyLoad load message from a topic notify topic as a result of subscribing to it. Note that no other messages would be received from a topic notify topic until the returned handler is used to select notifications required. More... | |
void | BeginWrite () |
void | EndWrite () |
void | Flush () |
void | SendBytes (byte[] values) |
void | Send (MessageBase message) |
Sends a message to Diffusion. Note that this method is not guaranteed to be thread-safe. More... | |
void | Subscribe (params string[] topics) |
Subscribe to one or more topics. This may be called before or after connection. If any topics in the list are already subscribed then they will be ignored. More... | |
void | Subscribe (TopicSet topics) |
Subscribe to a set of topics. This may be called before or after connection. If any topics in the set are already subscribed then they will be ignored. More... | |
void | Subscribe (TopicSet topics, ITopicListener listener) |
Subscribe to a set of topics and add a 'listener' for messages on that topic. More... | |
void | Unsubscribe (params string[] topics) |
Unsubscribe from one or more topics. More... | |
void | Unsubscribe (TopicSet topics) |
Unsubscribe from one or more topics. More... | |
void | Ping () |
Sends a ping to the Diffusion server. More... | |
void | Fetch (TopicSet topics, params string[] headers) |
Fetches the current state of a set of topics. The state of a topic may be retrieved without the need to subscribe to the topic in question. The state of each topic will be returned on the IServerConnectionListener.MessageFromServer method as a topic load message which will return true from the ITopicMessage.IsFetchReply method. More... | |
void | Fetch (string topic, params string[] headers) |
Fetch the current state of a set of topics. This is the same as calling Fetch( TopicSet, [] string ) with a TopicSet constructed from the specified topics list. More... | |
ITopicMessage | CreateLoadMessage (string topicName) |
Creates an empty load message. The message will have its capacity set to the value returned by APIProperties.GetDefaultLoadMessageCapacity(). More... | |
ITopicMessage | CreateLoadMessage (string topicName, int capacity) |
Creates an empty load message. More... | |
ITopicMessage | CreateDeltaMessage (string topicName) |
Creates an empty delta message. The message will have its capacity set to the value returned by APIProperties.GetDefaultDeltaMessageCapacity(). More... | |
ITopicMessage | CreateDeltaMessage (string topicName, int capacity) |
Creates an empty delta message. More... | |
bool | Acknowledge (ITopicMessage message) |
Acknowledges a message that is 'pending acknowledgement'. Assuming the message is pending acknowledgement, then a message of acknowledgement is sent to the server. More... | |
Properties | |
DiffusionConnectionService < ExternalClient > | ConnectionService [get] |
Provides public access to the reconnection service. More... | |
int | ServerProtocolVersion [get] |
string | TransportType [get] |
Returns the active transport type. More... | |
string | ClientId [get] |
Gets the client Id. More... | |
ConnectionCapabilities | Capabilities [get, set] |
Get/set the connection capabilities. More... | |
V4Credentials | Credentials [get, set] |
Get/set the credentials to use. More... | |
IConnectionDetails | ConnectionDetails [get, set] |
Get/set the connection details. More... | |
EventHandler< MessageEventArgs < TopicMessageImpl > > | TopicMessageReceived |
The event raised when a topic message is received from the Diffusion server. More... | |
EventHandler< MessageEventArgs < TopicStatusMessage > > | TopicStatusChanged |
The event raised when the status of a topic is changed. More... | |
EventHandler< MessageEventArgs < ClientPingMessageImpl > > | ServerPingReceived |
The event raised when a ping is received from the server. More... | |
EventHandler< MessageEventArgs < ServerPingMessageImpl > > | PingResponseReceived |
The event raised when a ping message is received from the Diffusion server. More... | |
EventHandler< MessageEventArgs < CredentialsRejectedMessage > > | CredentialsRejectedReceived |
The event raised when credentials are rejected by the Diffusion server. More... | |
EventHandler < ServerClosedEventArgs > | DiffusionServerConnectionAttemptFailed |
The event raised when connection to the Diffusion server fails. More... | |
EventHandler< MessageEventArgs < TopicMessageImpl > > | DiffusionServerConnected |
The event raised when connection has been established to the Diffusion server. More... | |
EventHandler < ServerClosedEventArgs > | DiffusionServerDisconnected |
The event raised when connection is lost to the Diffusion server. More... | |
EventHandler < ServerRejectedCredentialsEventArgs > | DiffusionServerCredentialsRejected |
The event raised when credentials are rejected by the Diffusion server. More... | |
EventHandler< MessageEventArgs < TopicMessageImpl > > | MessageAcknowledged |
The event raised when a message has been acknowledged by the Diffusion server. More... | |
EventHandler< MessageEventArgs < TopicMessageImpl > > | MessageNotAcknowledged |
The event raised when a message has not been acknowledged by the Diffusion server. More... | |
EventHandler< EventArgs > | ConnectionServiceStopped |
The event raised when the connection service is stopped. More... | |
EventHandler< EventArgs > | ConnectionSequenceExhausted |
The event fired when the load balance sequence is completed. More... | |
long | AckTimeout [get, set] |
Get/set the timeout for message acknowledgement responses. More... | |
bool | IsAutoAcknowledging [get, set] |
Gets/sets whether the External Client responds to 'ack' messages automatically. More... | |
IDiffusionTopicConnector | TopicConnector [get] |
Get the topic connector. More... | |
IServerDetails | ActiveServerDetails [get] |
Returns the server details currently in use. More... | |
int | MaxPacketSize [get, set] |
Gets or sets the maximum inbound and outbound packet sizes for the connection. More... | |
DateTime | LastInteraction [get] |
Returns the time of the last interaction (send or receive) with the Diffusion server. More... | |
bool | IsConnected [get] |
Indicates that a connection to the Diffusion server has been established. More... | |
ReadOnlyCollection < IServerConnectionListener > | ServerConnectionListeners [get] |
Get/set the listeners for server notifications. More... | |
IServerPingResponseListener | PingListener [get, set] |
Get/set the listener for ping responses. More... | |
IServerAckListener | AckListener [get, set] |
Get/set the listener for message acknowledgement responses. More... | |
bool | RestoreState [get, set] |
Indicates whether to attempt to restore state with an accordingly-configured Diffusion server upon loss of connection and subsequent reconnection. More... | |
EventHandler < ServerDetailsEventArgs > | ConnectionDetailsAcquired |
The event which is fired when a set of server details is acquired from the list. More... | |
Provides an External Client Connection to a Diffusion Server.
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | ConnectionCapabilities | capabilities | ) |
Constructor.
capabilities | The connection capabilities. |
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | ) |
Default constructor.
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | IConnectionDetails | connectionDetails | ) |
Construct a client connection object.
connectionDetails | The connection details specifying the details of the connection to a server. |
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | IServerConnectionListener | listener, |
IConnectionDetails | connectionDetails | ||
) |
Construct a client connection object.
listener | The listener for client connection events. |
connectionDetails | The connection details of the server to connect to. |
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | IServerDetails | serverDetails | ) |
Constructs a client connection object. This is a convenience constructor that automatically creates the IConnectionDetails from the IServerDetails object. The connection object is created but not connected until the Connect( TopicSet ) method is invoked. Initial topics to subscribe to may be specified on the server details or on connection.
serverDetails |
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | IServerDetails[] | serverDetails | ) |
Constructs a client connection object. This is a convenience constructor that automatically creates the IConnectionDetails from the IServerDetails list. The connection object is created but not connected until the Connect( TopicSet ) method is invoked. Initial topics to subscribe to may be specified on the server details or on connection.
serverDetails |
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | IServerConnectionListener | listener, |
IServerDetails | serverDetails | ||
) |
Constructs a client connection object. This is a convenience constructor that automatically creates the IConnectionDetails from the specified list of IServerDetails. The connection object is created but not connected until the Connect( TopicSet ) method is invoked. The specified IServerConnectionListener will receive all notifications. Initial topics to subscribe to may be specified on the server details or on connection.
listener | The listener to receive all notifications. |
serverDetails | Specifies the details of the server to connect to. |
PushTechnology.DiffusionExternalClient.ExternalClient.ExternalClient | ( | IServerConnectionListener | listener, |
string[] | urls | ||
) |
Convenience constructor which allows IConnectionDetails to be automatically created from one or more urls.
listener | The listener to receive all notifications. |
urls | One or more urls that will be converted into IServerDetails. |
bool PushTechnology.DiffusionExternalClient.ExternalClient.Acknowledge | ( | ITopicMessage | message | ) |
Acknowledges a message that is 'pending acknowledgement'. Assuming the message is pending acknowledgement, then a message of acknowledgement is sent to the server.
message | The message to acknowledge. |
void PushTechnology.DiffusionExternalClient.ExternalClient.AddGlobalTopicListener | ( | ITopicListener | listener | ) |
Adds a 'global' topic listener, i.e. one that listens to all topics.
listener |
void PushTechnology.DiffusionExternalClient.ExternalClient.AddServerConnectionListener | ( | IServerConnectionListener | listener | ) |
Adds a server connection listener with an interface method.
listener |
void PushTechnology.DiffusionExternalClient.ExternalClient.AddTopicListener | ( | Action< TopicMessageImpl > | listener, |
TopicSet | topics, | ||
Regex | topicRegex | ||
) |
Adds a topic listener.
listener | |
topicRegex | |
topics |
void PushTechnology.DiffusionExternalClient.ExternalClient.AddTopicListener | ( | ITopicListener | listener, |
TopicSet | topics | ||
) |
Adds a topic listener.
listener | |
topics |
void PushTechnology.DiffusionExternalClient.ExternalClient.AddTopicListener | ( | ITopicListener | listener, |
params string[] | topics | ||
) |
Adds a topic listener.
listener | |
topics |
void PushTechnology.DiffusionExternalClient.ExternalClient.BeginWrite | ( | ) |
void PushTechnology.DiffusionExternalClient.ExternalClient.Close | ( | ) |
Closes the connection to the Diffusion server.
void PushTechnology.DiffusionExternalClient.ExternalClient.Connect | ( | ) |
Connects to the server without subscribing to any topics.
void PushTechnology.DiffusionExternalClient.ExternalClient.Connect | ( | EventHandler< MessageEventArgs< TopicMessageImpl >> | successEvent, |
EventHandler< ServerClosedEventArgs > | failureEvent, | ||
EventHandler< ServerClosedEventArgs > | disconnectedEvent, | ||
EventHandler< MessageEventArgs< TopicMessageImpl >> | messageReceivedEvent | ||
) |
Attempts to establish a connection to a Diffusion server with callbacks.
successEvent | The event invoked when connection is successful. |
failureEvent | The event invoked when the connection attempt has failed. |
disconnectedEvent | The event invoked when connection has been lost. |
messageReceivedEvent | The event invoked when a message is received from the Diffusion server. |
void PushTechnology.DiffusionExternalClient.ExternalClient.Connect | ( | string[] | topics | ) |
Connects to the server. This is effectively the same as calling Connect( TopicSet ), specifying a TopicSet constructed from the topic list.
topics | A set of topics/topic selectors specifying the topics to initially subscribe to on connection. If no topics are specified then no topics will be subscribed to on connection. |
void PushTechnology.DiffusionExternalClient.ExternalClient.Connect | ( | TopicSet | topics | ) |
Connects to the server. If this is called when already connected then the supplied topics will simply be subscribed.
topics | A set of topics/topic selectors specifying the topics to initially subscribe to on connection. If this is null or empty then no topics will be subscribed to on connection. |
ITopicMessage PushTechnology.DiffusionExternalClient.ExternalClient.CreateDeltaMessage | ( | string | topicName | ) |
Creates an empty delta message. The message will have its capacity set to the value returned by APIProperties.GetDefaultDeltaMessageCapacity().
topicName | The topic name. |
ITopicMessage PushTechnology.DiffusionExternalClient.ExternalClient.CreateDeltaMessage | ( | string | topicName, |
int | capacity | ||
) |
Creates an empty delta message.
topicName | The topic name. |
capacity | The initial capacity of the message which should be sufficient to hold the data and any user headers. |
ITopicMessage PushTechnology.DiffusionExternalClient.ExternalClient.CreateLoadMessage | ( | string | topicName | ) |
Creates an empty load message. The message will have its capacity set to the value returned by APIProperties.GetDefaultLoadMessageCapacity().
topicName | The topic name. |
ITopicMessage PushTechnology.DiffusionExternalClient.ExternalClient.CreateLoadMessage | ( | string | topicName, |
int | capacity | ||
) |
Creates an empty load message.
topicName | The topic name. |
capacity | The initial capacity of the message which should be sufficient to hold the data and any user headers. |
IPagedTopicHandler PushTechnology.DiffusionExternalClient.ExternalClient.CreatePagedTopicHandler | ( | ITopicMessage | message, |
IPagedTopicListener | listener | ||
) |
Adds a handler object for a 'paged' Topic. This would be called in response to receiving an ITopicMessage.IsPagedLoad message from a paged topic as a result of subscribing to it. Note that no other messages would be received from a paged topic until the returned handler is used to IPagedTopicHandler.Open( int, int ) the topic.
message | The load message received from the topic. |
listener | An object that is to receive all notifications from the topic. |
IServiceTopicHandler PushTechnology.DiffusionExternalClient.ExternalClient.CreateServiceTopicHandler | ( | ITopicMessage | message, |
IServiceTopicListener | listener | ||
) |
Creates a handler object for a 'service' topic. This would be called in response to receiving an ITopicMessage.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. |
ITopicNotifyTopicHandler PushTechnology.DiffusionExternalClient.ExternalClient.CreateTopicNotifyTopicHandler | ( | ITopicMessage | message, |
ITopicNotifyTopicListener | listener | ||
) |
Creates a handler for a 'topic notify' topic. This would be called in response to receiving an ITopicMessage.IsTopicNotifyLoad load message from a topic notify topic as a result of subscribing to it. Note that no other messages would be received from a topic notify topic until the returned handler is used to select notifications required.
message | The load message received from the topic. |
listener | An object that is to receive all notifications from the topic. |
void PushTechnology.DiffusionExternalClient.ExternalClient.Disconnect | ( | ) |
Closes the connection to the Diffusion Server.
void PushTechnology.DiffusionExternalClient.ExternalClient.EndWrite | ( | ) |
void PushTechnology.DiffusionExternalClient.ExternalClient.Fetch | ( | TopicSet | topics, |
params string[] | headers | ||
) |
Fetches the current state of a set of topics. The state of a topic may be retrieved without the need to subscribe to the topic in question. The state of each topic will be returned on the IServerConnectionListener.MessageFromServer method as a topic load message which will return true from the ITopicMessage.IsFetchReply method.
topics | A set of topic names and/or topic selector patterns indicating topics to fetch the state of. |
headers | A set of headers may optionally be supplied and if they are then they will be reflected back with the fetched message (appended to user headers on the message if there are any). These headers may be used to supply correlation data so that the reply can be assocated with the request. |
void PushTechnology.DiffusionExternalClient.ExternalClient.Fetch | ( | string | topic, |
params string[] | headers | ||
) |
Fetch the current state of a set of topics. This is the same as calling Fetch( TopicSet, [] string ) with a TopicSet constructed from the specified topics list.
topic | Topic name and/or topic selector pattern indicating topic(s) to fetch the state of. A list of such patterns separated by ',' may be supplied if required. |
headers | A set of headers may optionally be supplied and if they are then they will be reflected back with the fetched message (appended to user headers on the message if there are any). These headers may be used to supply correlation data so that the reply can be associated with the request. |
void PushTechnology.DiffusionExternalClient.ExternalClient.Flush | ( | ) |
void PushTechnology.DiffusionExternalClient.ExternalClient.Ping | ( | ) |
Sends a ping to the Diffusion server.
void PushTechnology.DiffusionExternalClient.ExternalClient.Reconnect | ( | ) |
Attempts to re-establish a connection to a Diffusion server.
void PushTechnology.DiffusionExternalClient.ExternalClient.RemoveTopicListener | ( | ITopicListener | listener | ) |
Remove a topic listener.
listener |
void PushTechnology.DiffusionExternalClient.ExternalClient.Send | ( | MessageBase | message | ) |
Sends a message to Diffusion. Note that this method is not guaranteed to be thread-safe.
message |
void PushTechnology.DiffusionExternalClient.ExternalClient.SendBytes | ( | byte[] | values | ) |
void PushTechnology.DiffusionExternalClient.ExternalClient.Subscribe | ( | params string[] | topics | ) |
Subscribe to one or more topics. This may be called before or after connection. If any topics in the list are already subscribed then they will be ignored.
topics |
void PushTechnology.DiffusionExternalClient.ExternalClient.Subscribe | ( | TopicSet | topics | ) |
Subscribe to a set of topics. This may be called before or after connection. If any topics in the set are already subscribed then they will be ignored.
topics |
void PushTechnology.DiffusionExternalClient.ExternalClient.Subscribe | ( | TopicSet | topics, |
ITopicListener | listener | ||
) |
Subscribe to a set of topics and add a 'listener' for messages on that topic.
topics | The topics to subscribe to. |
listener | The topic message listener. |
void PushTechnology.DiffusionExternalClient.ExternalClient.Unsubscribe | ( | params string[] | topics | ) |
Unsubscribe from one or more topics.
topics |
void PushTechnology.DiffusionExternalClient.ExternalClient.Unsubscribe | ( | TopicSet | topics | ) |
Unsubscribe from one or more topics.
topics |
|
getset |
Get/set the listener for message acknowledgement responses.
|
getset |
Get/set the timeout for message acknowledgement responses.
|
get |
Returns the server details currently in use.
|
getset |
Get/set the connection capabilities.
|
get |
Gets the client Id.
|
getset |
Get/set the connection details.
|
addremove |
The event which is fired when a set of server details is acquired from the list.
|
addremove |
The event fired when the load balance sequence is completed.
|
get |
Provides public access to the reconnection service.
|
addremove |
The event raised when the connection service is stopped.
|
getset |
Get/set the credentials to use.
|
addremove |
The event raised when credentials are rejected by the Diffusion server.
|
addremove |
The event raised when connection has been established to the Diffusion server.
|
addremove |
The event raised when connection to the Diffusion server fails.
|
addremove |
The event raised when credentials are rejected by the Diffusion server.
|
addremove |
The event raised when connection is lost to the Diffusion server.
|
getset |
Gets/sets whether the External Client responds to 'ack' messages automatically.
|
get |
Indicates that a connection to the Diffusion server has been established.
|
get |
Returns the time of the last interaction (send or receive) with the Diffusion server.
|
getset |
Gets or sets the maximum inbound and outbound packet sizes for the connection.
|
addremove |
The event raised when a message has been acknowledged by the Diffusion server.
|
addremove |
The event raised when a message has not been acknowledged by the Diffusion server.
|
getset |
Get/set the listener for ping responses.
|
addremove |
The event raised when a ping message is received from the Diffusion server.
|
getset |
Indicates whether to attempt to restore state with an accordingly-configured Diffusion server upon loss of connection and subsequent reconnection.
|
get |
Get/set the listeners for server notifications.
|
addremove |
The event raised when a ping is received from the server.
|
get |
|
get |
Get the topic connector.
|
addremove |
The event raised when a topic message is received from the Diffusion server.
|
addremove |
The event raised when the status of a topic is changed.
|
get |
Returns the active transport type.