DEPRECATED: Diffusion Silverlight Classic API  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.Transports.Service.ServiceTopicHandler Class Reference

A service topic handler. More...

Public Member Functions

 ServiceTopicHandler (DiffusionClient client, TopicMessage topicMessage, IServiceTopicListener listener)
 Constructor. More...
 
string Request (string requestType, TopicMessage data, string requestId=null)
 Sends a request to the service. More...
 
string GetNextRequestId ()
 Returns a new unique request identifier that may be used in the Request( string, TopicMessage, string ) call. More...
 

Properties

string ServiceType [get, set]
 Get/set the service type. More...
 
string TopicCategory [get, set]
 Get/set the topic category. More...
 
TopicMessage ServiceData [get, set]
 Get/set the service data message. More...
 
string TopicName [get, set]
 Get/set the topic name. More...
 
string RequestId [get, set]
 Get/set the request id. More...
 

Detailed Description

A service topic handler.

A service topic is one that provides request/response capability. 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. In response to such a message, the client application should create a handler of the this type using the client connection's DiffusionClient.CreateServiceTopicHandler( DiffusionInboundTopicMessage, IServiceTopicListener ) method and declaring an IServiceTopicListener to receive all responses and notifications from the 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.

Constructor & Destructor Documentation

PushTechnology.Transports.Service.ServiceTopicHandler.ServiceTopicHandler ( DiffusionClient  client,
TopicMessage  topicMessage,
IServiceTopicListener  listener 
)

Constructor.

Parameters
client
topicMessage
listener

Member Function Documentation

string PushTechnology.Transports.Service.ServiceTopicHandler.GetNextRequestId ( )

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

Returns
A unique request identifier.
string PushTechnology.Transports.Service.ServiceTopicHandler.Request ( string  requestType,
TopicMessage  data,
string  requestId = null 
)

Sends a request to the service.

If the request succeeds then a response will be returned on IServiceTopicListener( ServiceTopicResponse ) 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.
requestId
Returns

Property Documentation

string PushTechnology.Transports.Service.ServiceTopicHandler.RequestId
getset

Get/set the request id.

TopicMessage PushTechnology.Transports.Service.ServiceTopicHandler.ServiceData
getset

Get/set the service data message.

string PushTechnology.Transports.Service.ServiceTopicHandler.ServiceType
getset

Get/set the service type.

string PushTechnology.Transports.Service.ServiceTopicHandler.TopicCategory
getset

Get/set the topic category.

string PushTechnology.Transports.Service.ServiceTopicHandler.TopicName
getset

Get/set the topic name.


The documentation for this class was generated from the following file: