![]() |
DEPRECATED: Diffusion Silverlight Classic API
5.9.4
|
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... | |
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.
PushTechnology.Transports.Service.ServiceTopicHandler.ServiceTopicHandler | ( | DiffusionClient | client, |
TopicMessage | topicMessage, | ||
IServiceTopicListener | listener | ||
) |
Constructor.
client | |
topicMessage | |
listener |
string PushTechnology.Transports.Service.ServiceTopicHandler.GetNextRequestId | ( | ) |
Returns a new unique request identifier that may be used in the Request( string, TopicMessage, string ) call.
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 ).
requestType | The request type. This must be one of the allowed types for the service. |
data | Optional request data. If supplied then the headers and data from the given message will be sent with the request. |
requestId |
|
getset |
Get/set the request id.
|
getset |
Get/set the service data message.
|
getset |
Get/set the service type.
|
getset |
Get/set the topic category.
|
getset |
Get/set the topic name.