Diffusion .NET API  5.9.24
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Features.IServiceTopic Interface Reference

Representation of a service topic at the client side. More...

Public Member Functions

void SetHandler (IRequesterFeatureResponseHandler handler)
 Sets a handler to receive responses from the service topic. More...
 
string Request (string requestType, IContent 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, IContent ) call. More...
 
void Request (string requestType, string requestId, IContent data)
 Sends a request to the service. More...
 

Properties

int Topic [get]
 Returns the identifier of the service topic. More...
 
string ServiceType [get]
 Returns the service type. More...
 
IContent ServiceData [get]
 Returns any fixed data returned by the service on subscription. More...
 

Detailed Description

Representation of a service topic at the client side.

A service topic is one that provides request/response capability.

When the IServices service is in use then a subscription to a service topic will be notified via IRequesterFeatureHandler.ServiceTopicSubscribed( IServiceTopic ) which will pass an instance of this class for interacting with the service topic at the server side. An IRequesterFeatureResponseHandler must be set using SetHandler( IRequesterFeatureResponseHandler ) to receive responses from the service topic.

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

When such a service topic is in use, content received on the topic will not be delivered to any topic listener declared for the topic.

Member Function Documentation

string PushTechnology.ClientInterface.Client.Features.IServiceTopic.GetNextRequestId ( )

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

Returns
A unique request identifier.
string PushTechnology.ClientInterface.Client.Features.IServiceTopic.Request ( string  requestType,
IContent  data 
)

Sends a request to the service.

If the request succeeds, a response will be returned on IServiceResponseHandler.ServiceResponse( IResponse ) and if it fails or is timed out at the server, an error will be returned on IServiceResponseHandler.ServiceError( IServiceResponseError ).

Parameters
requestTypeThe request type. This must be one of the allowed types for the service as defined at the server.
dataOptional request data.
Returns
An automatically generated unique request identifier.
void PushTechnology.ClientInterface.Client.Features.IServiceTopic.Request ( string  requestType,
string  requestId,
IContent  data 
)

Sends a request to the service.

If the request succeeds, a response will be returned on IServiceResponseHandler.ServiceResponse( IResponse ) and if it fails or is timed out at the server, an error will be returned on IServiceResponseHandler.ServiceError( IServiceResponseError ).

Parameters
requestTypeThe request type. This must be one of the allowed types for the service as defined at the server.
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 will be sent with the request.
void PushTechnology.ClientInterface.Client.Features.IServiceTopic.SetHandler ( IRequesterFeatureResponseHandler  handler)

Sets a handler to receive responses from the service topic.

A handler must be set before sending requests to the service.

Parameters
handler

Property Documentation

IContent PushTechnology.ClientInterface.Client.Features.IServiceTopic.ServiceData
get

Returns any fixed data returned by the service on subscription.

The content may contain headers and/or data as set in the service topic or may be empty if no data was set.

string PushTechnology.ClientInterface.Client.Features.IServiceTopic.ServiceType
get

Returns the service type.

This is the service type as defined by the service topic at the server.

int PushTechnology.ClientInterface.Client.Features.IServiceTopic.Topic
get

Returns the identifier of the service topic.


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