AMPS C# Client
5.3.3.4
AMPS C# Client for .NET
|
Public Member Functions | |
void | addRoute (CommandId commandId_, MessageHandler messageHandler_, Message.AckTypes requestedAcks_, Message.AckTypes systemAcks_, bool isSubscribe_) |
bool | removeRoute (CommandId commandId_) |
bool | hasRoute (CommandId commandId_) |
MessageHandler | findRoute (CommandId commandId_) |
void | clear () |
void | unsubscribeAll () |
int | deliverAck (Message ackMessage_, Message.AckTypes ackType_) |
int | deliverData (Message dataMessage_) |
int | deliverData (Message dataMessage_, CommandId commandId_) |
MessageRouter is used to register and manage a list of handler objects for messages, and then to route messages to those handlers as messages arrive. MessageRouter also "knows" about the meaning of AMPS acks and can use them to automatically clean up routes as acks arrive.
|
inline |
Adds a route to self.
commandId_ | The command, query, or subid used for this route. |
messageHandler_ | The message handler to route to |
requestedAcks_ | The acks requested by the user for this command |
systemAcks_ | The acks not requested by the end user, but requested by AMPS. These will not be delivered to the message handler, but are still processed for auto-removal. |
isSubscribe_ | True if this route is for an ongoing subscription |
|
inline |
Removes all routes from self.
|
inline |
Deliver a message that is known already to be an Ack. Coordinates the removal of routes based on the ack received and the original message type.
ackMessage_ | The Message to deliver. |
ackType_ | The ack type from that message. |
Any | exception from user message handlers. |
|
inline |
Delivers a data message (not an Ack) to the registered route. Uses the commandID, subID, and queryID to deliver find a route and deliver to the first one found. This method is optimized for speed and does not attempt to examine ack types for removal of routes.
dataMessage_ | The non-ack message to deliver. |
Exception | Any exception thrown by the user message handler. |
Delivers a data message using a specific command ID from the message. Optimized for speed and does not attempt to examine the message for auto-removal of routes
dataMessage_ | The message to deliver. |
commandId_ | The command ID which will be used to lookup the delivery route |
Exception | Any exception returned thrown by the message handler. |
|
inline |
Find and return a route
commandId_ | The command id for this route |
|
inline |
Return if a route exists
commandId_ | The command id for this route |
|
inline |
Remove a route from self.
commandId_ | The route to remove |
|
inline |
Removes all subscriptions from self.