Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl Class Reference

Implementation of IServiceTopicHandler. More...

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

Public Member Functions

 ServiceTopicHandlerImpl (IDiffusionClientConnector client, ITopicMessage loadMessage, IServiceTopicListener listener)
 Constructor. More...
 
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...
 
bool HandleTopicMessage (IMessageSource source, ITopicMessage message)
 Handles a message received from an IMessageSource. More...
 
string GetNextRequestId ()
 Returns a new unique request identifier that may be used in the Request( string, string, ITopicMessage ) call. More...
 

Properties

IDiffusionClientConnector Client [get, set]
 Get/set the client connection object. More...
 
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...
 
- Properties inherited from PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler
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

Implementation of IServiceTopicHandler.

Constructor & Destructor Documentation

PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.ServiceTopicHandlerImpl ( IDiffusionClientConnector  client,
ITopicMessage  loadMessage,
IServiceTopicListener  listener 
)

Constructor.

Parameters
client
loadMessage
listener

Member Function Documentation

string PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.GetNextRequestId ( )

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

Returns
A unique request identifier.

Implements PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.

bool PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.HandleTopicMessage ( IMessageSource  source,
ITopicMessage  message 
)

Handles a message received from an IMessageSource.

This will handle an incoming message from a specified source.

Parameters
sourceThe message source.
messageThe message.

Implements PushTechnology.DiffusionCore.Messaging.Topic.ITopicListener.

string PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.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

Implements PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.

string PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.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

Implements PushTechnology.DiffusionCore.Connection.Connectors.ExternalClient.Service.IServiceTopicHandler.

Property Documentation

IDiffusionClientConnector PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.Client
getset

Get/set the client connection object.

IDiffusionClientConnector PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.Connection
get

Returns the client connection.

ITopicMessage PushTechnology.DiffusionCore.Messaging.Data.Service.ServiceTopicHandlerImpl.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.Messaging.Data.Service.ServiceTopicHandlerImpl.ServiceType
get

Returns the service type.

This is the service type as returned by the IServiceTopicData.