Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler Interface Reference

A service topic handler. More...

Inheritance diagram for PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler:
PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl

Public Member Functions

string Request (string requestType, ITopicMessage data)
 Sends a request to the service. More...
 
string Request (string requestType, string requestId, ITopicMessage data)
 Sends a request to the service. More...
 
string GetNextRequestId ()
 Returns a new unique request identifier that may be used in the Request( string, string, ITopicMessage ) call. More...
 

Properties

IDiffusionClientConnector Connection [get]
 Returns the client connection. More...
 
string ServiceType [get]
 Returns the service type. More...
 
ITopicMessage ServiceData [get]
 Returns a message containing any fixed data returned by the service on subscription. More...
 

Detailed Description

A service topic handler.

A service topic is one that provides request/response capability (see IServiceTopicData). When a client subscribes to a service topic then a topic load message will be received by the client that indicates that it is a service load message (ITopicMessage.IsServiceLoad). In response to such a message, the client application should create a handler of this type using the client connection ExternalClient.CreateServiceTopicHandler( ITopicMessage, IServiceTopicListener) method and declaring an IServiceTopicListener to receive all responses and notifications from this topic.

The handler simplifies the use of such a topic and avoids having to format messages to send to the topic or parse messages received from it.

When such a handler is in use then messages received on the topic will not be delivered to the IServerConnectionListener declared to the ExternalClient object.

Member Function Documentation

string PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.GetNextRequestId ( )

Returns a new unique request identifier that may be used in the Request( string, string, ITopicMessage ) call.

Returns
A unique request identifier.

Implemented in PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.

string PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.Request ( string  requestType,
ITopicMessage  data 
)

Sends a request to the service.

If the request succeeds then a response will be returned on IServiceTopicListener.ServiceResponse( IServiceTopicResponse ) and if it fails or is timed out at the server then an error will be returned on IServiceTopicListener.ServiceError( ServiceTopicError ).

Parameters
requestTypeThe request type. This must be one of the allowed types for the service.
dataOptional request data. If supplied, then the headers and data from the given message will be sent with the request.
Returns

Implemented in PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.

string PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.Request ( string  requestType,
string  requestId,
ITopicMessage  data 
)

Sends a request to the service.

If the request succeeds then a response will be returned on IServiceTopicListener.ServiceResponse( IServiceTopicResponse ) and if it fails or is timed out at the server then an error will be returned on IServiceTopicListener.ServiceError( ServiceTopicError ).

Parameters
requestTypeThe request type. This must be one of the allowed types for the service.
requestIdA unique request identifier. This must be unique - the GetNextRequestId method may be used to generate a unique identifier. If the identifier passed is not unique then the results will be unpredictable.
dataOptional request data. If supplied, then the headers and data from the given message will be sent with the request.
Returns

Implemented in PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.

Property Documentation

IDiffusionClientConnector PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.Connection
get

Returns the client connection.

ITopicMessage PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.ServiceData
get

Returns a message containing any fixed data returned by the service on subscription.

The message may contain headers and/or data as set in the IServiceTopicData or may be empty if no data was set.

string PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.ServiceType
get

Returns the service type.

This is the service type as returned by the IServiceTopicData.