|
void | setReconnectDelay (int reconnectInterval) |
| Sets the time delay between reconnection events. More...
|
|
HAClient | setReconnectDelayStrategy (ReconnectDelayStrategy strategy_) |
| Sets the ReconnectDelayStrategy for this client, replacing any previous strategy. More...
|
|
void | setLogonOptions (string options_) |
| Sets the options string passed in during logon. More...
|
|
string | getLogonOptions () |
| Gets the options string passed in during logon. More...
|
|
void | setTimeout (int timeout_) |
| Sets the timeout for logon and re-subscribe sequence during a reconnection event. More...
|
|
int | getTimeout () |
| Gets the timeout for logon and re-subscribe sequence during a reconnection event. More...
|
|
ServerChooser | getServerChooser () |
| Returns the current ServerChooser for this client More...
|
|
void | setServerChooser (ServerChooser serverChooser_) |
| Sets the ServerChooser for this client More...
|
|
| HAClient (string name) |
| Constructs a new "highly-available" HAClient More...
|
|
void | connectAndLogon () |
| Connects to the next server chosen for us by our ServerChooser. Will continue attempting to connect and logon to each successive URI returned by the ServerChooser until the connection succeeds or the ServerChooser returns an empty URI. More...
|
|
override void | connect (string uri) |
| Connects to the AMPS instance through the provided URI. The URI is a String with the format: More...
|
|
override CommandId | logon () |
| Logs into AMPS with the parameters provided in the connect method. More...
|
|
override CommandId | logon (long timeout) |
| Logs into AMPS with the parameters provided in the connect method and the logon correlation data if set. More...
|
|
override CommandId | logon (long timeout, Authenticator authenticator) |
| Logs into AMPS with the parameters provided in the connect method and the logon correlation data if set. More...
|
|
override CommandId | logon (string options) |
| Logs into AMPS with the parameters provided in the connect method and the logon correlation data if set. More...
|
|
override CommandId | logon (long timeout, string options) |
| Logs into AMPS with the parameters provided in the connect method and the logon correlation data if set. More...
|
|
override CommandId | logon (long timeout, Authenticator authenticator, string options) |
| Logs into AMPS with the parameters provided in the connect method and the logon correlation data if set. More...
|
|
override void | disconnect () |
| Disconnect from the AMPS server. More...
|
|
override ConnectionInfo | getConnectionInfo () |
|
delegate void | ExceptionListener (Exception e) |
|
| Client (String name) |
| Creates a new AMPS client More...
|
|
| Client (String name, int version) |
| Creates a new client More...
|
|
| Client (String name, Store store) |
| Creates a client with a persistent store. More...
|
|
| Client (String name, Store store, int version) |
| Creates a client with a persistent store. More...
|
|
| Client (String name, Transport transport) |
| Creates a client with a transport. More...
|
|
| Client (String name, Transport transport, int version) |
| Creates a client with a transport. More...
|
|
| Client (String name, Transport transport, Store store) |
| Creates a client with a transport and persistent store. More...
|
|
| Client (String name, Transport transport, Store store, int version) |
| Creates a client with a transport and persistent store. More...
|
|
String | getName () |
| Return the name of the Client. More...
|
|
String | getNameHash () |
| Return the name hash of the Client as returned by the server after logon. More...
|
|
int | getServerVersion () |
| Return the server version retrieved during logon. If the client has not logged on or is connected to a server whose version is less than 3.8.0.0 this function will return 0. The version uses 2 digits each for major minor maintenance and hotfix i.e., 3.8.1.5 will return 3080105 Versions of AMPS prior to 3.8.0.0 did not return the server version to the client in the logon ack. More...
|
|
VersionInfo | getServerVersionInfo () |
| Return the server version retrieved during logon. If the client has not logged on or is connected to a server whose version is less than 3.8.0.0 this function will return the latest release version. The version is returned as a VersionInfo. Versions of AMPS prior to 3.8.0.0 did not return the server version to the client in the logon ack. More...
|
|
Uri | getURI () |
| Returns the URI the client is connected to. More...
|
|
Transport | getTransport () |
| Return the underlying transport. For advanced users, this method provides direct access to the transport. Care needs to be taken to not modify the underlying transport in ways that are incompatible with the Client. More...
|
|
void | setBookmarkStore (BookmarkStore val) |
|
BookmarkStore | getBookmarkStore () |
|
void | setPublishStore (Store store) |
|
Store | getPublishStore () |
|
void | setDisconnectHandler (ClientDisconnectHandler disconnectHandler) |
| Sets the ClientDisconnectHandler . In the event that the Client is unintentionally disconnected from AMPS, the More...
|
|
void | setDisconnectHandler (Action< Client > disconnectHandler) |
| Sets the lambda function called in the event of client disconnect More...
|
|
ClientDisconnectHandler | getDisconnectHandler () |
| Gets the currently configured ClientDisconnectHandler More...
|
|
void | setLastChanceMessageHandler (MessageHandler messageHandler) |
| Sets the MessageHandler instance used when no other handler matches. More...
|
|
void | setLastChanceMessageHandler (Action< Message > messageHandler) |
| Sets the MessageHandler instance used when no other handler matches. More...
|
|
void | setUnhandledMessageHandler (MessageHandler messageHandler) |
| Sets the MessageHandler instance used when no other handler matches. More...
|
|
void | setUnhandledMessageHandler (Action< Message > messageHandler) |
| Sets the lambda function used when no other handler matches. More...
|
|
void | setExceptionListener (ExceptionListener exceptionListener) |
| Sets the ExceptionListener instance used for communicating absorbed exceptions. More...
|
|
ExceptionListener | getExceptionListener () |
| Gets the currently configured ExceptionListener More...
|
|
void | setSubscriptionManager (SubscriptionManager subscriptionManager) |
| Sets the SubscriptionManager instance used for recording active subscriptions. More...
|
|
SubscriptionManager | getSubscriptionManager () |
| Gets the currently configured SubscriptionManager More...
|
|
void | setGlobalCommandTypeMessageHandler (string command_, MessageHandler messageHandler_) |
| Sets the MessageHandler that will be called in the event of a message of the given command type. More...
|
|
void | setGlobalCommandTypeMessageHandler (Message.Commands command_, MessageHandler messageHandler_) |
| Sets the MessageHandler that will be called in the event of a message of the given command type. More...
|
|
void | setGlobalCommandTypeMessageHandler (GlobalCommandTypeHandlers command_, MessageHandler messageHandler_) |
| Sets the MessageHandler that will be called in the event of a message of the given command type. More...
|
|
void | setDuplicateMessageHandler (MessageHandler messageHandler) |
| Sets the MessageHandler that will be called in the event of a duplicate message More...
|
|
MessageHandler | getDuplicateMessageHandler () |
| Returns the MessageHandler that will be called in the event of a duplicate message More...
|
|
void | setFailedWriteHandler (FailedWriteHandler handler_) |
| Sets the FailedWriteHandler instance that will be called in the event that messages fail to be written More...
|
|
void | setFailedWriteHandler (FailedWriteHandlerV4 handler_) |
| Sets the FailedWriteHandlerV4 instance that will be called in the event that messages fail to be written More...
|
|
FailedWriteHandler | getFailedWriteHandler () |
| Returns the the FailedWriteHandler instance that will be called in the event that messages fail to be written More...
|
|
void | close () |
| Disconnect from the AMPS server. More...
|
|
Message | allocateMessage () |
| Creates a new Message appropriate for this client. This function should be called rarely, since it does allocate a handful of small objects. Users sensitive to garbage collection delays should cache the message object for later usage. More...
|
|
virtual void | setHeartbeat (int heartbeatInterval_, int readTimeout_) |
| Sets a heartbeat on this connection. When a heartbeat is set, the client periodically sends a heartbeat message to AMPS. This helps the client more quickly detect disconnection from AMPS. More...
|
|
void | setHeartbeat (int heartbeatInterval_) |
| Sets a heartbeat on this connection. When a heartbeat is set, the client periodically sends a heartbeat message to AMPS. This helps the client more quickly detect disconnection from AMPS. More...
|
|
void | send (Message m) |
| Send a Message to AMPS via the Transport used in the Client. More...
|
|
void | addMessageHandler (CommandId commandId_, MessageHandler messageHandler_, Message.AckTypes requestedAcks_, bool isSubscribe_) |
| Adds a MessageHandler for a given CommandId to self. More...
|
|
bool | removeMessageHandler (CommandId commandId_) |
|
void | setRetryOnDisconnect (bool isRetryOnDisconnect) |
| Set whether or not messages being sent to the server should retry if the client is disconnected. This is most useful if you are publishing data that has a very short lifetime and so is no longer relevant after the time it takes to reconnect. More...
|
|
bool | getRetryOnDisconnect () |
| Return whether or not messages being sent to the server will retry if the client is disconnected. More...
|
|
void | setDefaultMaxDepth (int defaultMaxDepth) |
| Set the default max depth to be used on all MessageStream results. More...
|
|
int | getDefaultMaxDepth () |
| Return the current default max depth value set on MessageStream results. More...
|
|
CommandId | send (MessageHandler messageHandler, Message message, long timeout) |
| Send a Message to AMPS and register the messageHandler for any messages resulting from command execution. More...
|
|
CommandId | send (Action< Message > messageHandler, Message message, long timeout) |
| Send a Message to AMPS and register the messageHandler for any messages resulting from command execution. More...
|
|
ulong | publish (byte[] topic, int topicOffset, int topicLength, byte[] data, int dataOffset, int dataLength, int expiration) |
| Publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | publish (byte[] topic, int topicOffset, int topicLength, byte[] data, int dataOffset, int dataLength) |
| Publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | publish (String topic, String data) |
| Publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | publish (String topic, String data, int expiration) |
| Publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | deltaPublish (byte[] topic, int topicOffset, int topicLength, byte[] data, int dataOffset, int dataLength) |
| Delta publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | deltaPublish (byte[] topic, int topicOffset, int topicLength, byte[] data, int dataOffset, int dataLength, int expiration) |
| Delta publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | deltaPublish (String topic, String data) |
| Delta publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
ulong | deltaPublish (String topic, String data, int expiration) |
| Delta publish a message to an AMPS topic. If the client has a publish store set, More...
|
|
CommandId | bookmarkSubscribe (MessageHandler messageHandler, String topic, String filter=null, CommandId subId=null, String bookmark=null, string options=null, long timeout=0) |
| Places a bookmark subscription with AMPS. Starts replay at the most recent message reported by the BookmarkStore. More...
|
|
CommandId | subscribe (MessageHandler messageHandler, String topic, String filter, long timeout) |
| Places a subscription with AMPS. More...
|
|
CommandId | subscribe (Action< Message > messageHandler, String topic, String filter, long timeout) |
| Places a subscription with AMPS. More...
|
|
MessageStream | subscribe (string topic, string filter=null, string options=null, long timeout=0, string subid=null) |
| Places a subscription with AMPS. More...
|
|
CommandId | subscribe (MessageHandler messageHandler, String topic, String filter=null, string options=null, long timeout=0, String subId=null) |
| Places a subscription with AMPS. More...
|
|
CommandId | subscribe (Action< Message > messageHandler, String topic, String filter=null, String options=null, long timeout=0, string subid=null) |
| Places a subscription with AMPS. More...
|
|
CommandId | subscribe (MessageHandler messageHandler, String topic, long timeout) |
| Places a subscription with AMPS. More...
|
|
CommandId | subscribe (Action< Message > messageHandler, String topic, long timeout) |
| Places a subscription with AMPS. More...
|
|
CommandId | deltaSubscribe (MessageHandler messageHandler, String topic, String filter=null, String options=null, long timeout=0, String subId=null) |
| Places a delta subscription with AMPS. More...
|
|
CommandId | deltaSubscribe (Action< Message > messageHandler, String topic, String filter=null, String options=null, long timeout=0, String subId=null) |
| Places a delta subscription with AMPS. More...
|
|
void | unsubscribe (CommandId subscriptionId) |
| Remove a subscription from AMPS. More...
|
|
void | unsubscribe () |
| Remove all of the client's subscriptions from AMPS. More...
|
|
MessageStream | sow (String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query. More...
|
|
CommandId | sow (MessageHandler messageHandler, String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query. More...
|
|
CommandId | sow (Action< Message > messageHandler, String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query. More...
|
|
CommandId | sow (MessageHandler messageHandler, String topic, String filter, int batchSize, long timeout) |
| Executes a SOW query. More...
|
|
CommandId | sow (MessageHandler messageHandler, String topic, int batchSize, long timeout) |
| Executes a SOW query. More...
|
|
CommandId | sow (Action< Message > messageHandler, String topic, int batchSize, long timeout) |
| Executes a SOW query. More...
|
|
CommandId | sow (MessageHandler messageHandler, String topic, long timeout) |
| Executes a SOW query. More...
|
|
CommandId | sow (Action< Message > messageHandler, String topic, long timeout) |
| Executes a SOW query. More...
|
|
MessageStream | sowAndSubscribe (String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (MessageHandler messageHandler, String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (Action< Message > messageHandler, String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (MessageHandler messageHandler, String topic, String filter, int batchSize, bool oofEnabled, long timeout) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (Action< Message > a, String topic, String filter, int batchSize, bool sendOOF, long timeout) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (MessageHandler messageHandler, String topic, int batchSize, long timeout) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (Action< Message > a, String topic, int batchSize, long timeout) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (MessageHandler messageHandler, String topic, long timeout) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndSubscribe (Action< Message > a, String topic, long timeout) |
| Executes a SOW query and places a subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (MessageHandler messageHandler, String topic, String filter=null, String orderBy=null, String bookmark=null, String options=null, int batchSize=10, int topN=-1, long timeout=0) |
| Executes a SOW query and places a delta subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (MessageHandler messageHandler, String topic, String filter, int batchSize, bool oofEnabled, bool sendEmpties, long timeout) |
| Executes a SOW query and places a delta subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (Action< Message > messageHandler, String topic, String filter, int batchSize, bool oofEnabled, bool sendEmpties, long timeout) |
| Executes a SOW query and places a delta subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (MessageHandler messageHandler, String topic, int batchSize, long timeout) |
| Executes a SOW query and places a delta subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (Action< Message > messageHandler, String topic, int batchSize, long timeout) |
| Executes a SOW query and places a delta subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (MessageHandler messageHandler, String topic, long timeout) |
| Executes a SOW query and places a delta subscription. More...
|
|
CommandId | sowAndDeltaSubscribe (Action< Message > messageHandler, String topic, long timeout) |
| Executes a SOW query and places a delta subscription. More...
|
|
Message | sowDelete (String topic, String filter, long timeout=0) |
| Executes a SOW delete with filter. More...
|
|
CommandId | sowDelete (MessageHandler messageHandler, String topic, String filter, long timeout=0) |
| Executes a SOW delete with filter. More...
|
|
CommandId | sowDelete (Action< Message > messageHandler, String topic, String filter, long timeout=0) |
| Executes a SOW delete with filter. More...
|
|
void | startTimer () |
|
CommandId | stopTimer (MessageHandler messageHandler, long timeout) |
|
void | setLogonCorrelationData (String correlationData) |
| Gets the uninterpreted logon correlation information currently set. More...
|
|
String | getLogonCorrelationData () |
| Gets the uninterpreted logon correlation information currently set. More...
|
|
CommandId | sowDeleteByKeys (MessageHandler messageHandler, String topic, String keys, long timeout=0) |
| Executes a SOW delete by sow key. More...
|
|
CommandId | sowDeleteByKeys (Action< Message > messageHandler, String topic, String keys, long timeout=0) |
| Executes a SOW delete by sow key. More...
|
|
CommandId | sowDeleteByData (MessageHandler messageHandler, String topic, String data, long timeout=0) |
| Executes a SOW delete by data. AMPS uses key fields in the data to find and delete a message with the same keys. More...
|
|
CommandId | sowDeleteByData (Action< Message > messageHandler, String topic, String data, long timeout=0) |
| Executes a SOW delete by data. AMPS uses key fields in the data to find and delete a message with the same keys. More...
|
|
void | publishFlush () |
| Ensures that AMPS messages are sent and have been processed by the AMPS server. The client issues a flush command and waits for an acknowledgement. This mehthod blocks until messages have been processed and is most useful when the application reaches a point at which it is acceptable to block to ensure that messages are delivered to the AMPS server. For example, an application might call publishFlush before exiting. One thing to note is that if AMPS is unavailable (HA Client), publishFlush needs to wait for a connection to come back up which may look like it's hanging.
|
|
void | publishFlush (int timeout) |
| Ensures that AMPS messages are sent and have been processed by the AMPS server. The client issues a flush command and waits for an acknowledgement or until the timeout expires. This mehthod blocks until messages have been processed and is most useful when the application reaches a point at which it is acceptable to block to ensure that messages are delivered to the AMPS server. For example, an application might call publishFlush before exiting. One thing to note is that if AMPS is unavailable (HA Client), publishFlush needs to wait for a connection to come back up which may look like it's hanging. - Parameters
-
timeout | Number of milliseconds to wait for flush, where 0 indicates no timeout |
|
|
void | publishFlush (string ackType_) |
| Ensures that AMPS messages are sent and have been processed by the AMPS server. The client issues a flush command and waits for an acknowledgement. This mehthod blocks until messages have been processed and is most useful when the application reaches a point at which it is acceptable to block to ensure that messages are delivered to the AMPS server. For example, an application might call publishFlush before exiting. One thing to note is that if AMPS is unavailable (HA Client), publishFlush needs to wait for a connection to come back up which may look like it's hanging. - Parameters
-
ackType_ | The acknowledgement type that the flush command should wait to receive, see Message.AckType. 'processed' matches the timeout only version of this function. persisted ensures all previous messages have been persisted. |
|
|
void | publishFlush (string ackType_, int timeout) |
| Ensures that AMPS messages are sent and have been processed by the AMPS server. The client issues a flush command and waits for an acknowledgement or until the timeout expires. This mehthod blocks until messages have been processed and is most useful when the application reaches a point at which it is acceptable to block to ensure that messages are delivered to the AMPS server. For example, an application might call publishFlush before exiting. One thing to note is that if AMPS is unavailable (HA Client), publishFlush needs to wait for a connection to come back up which may look like it's hanging. - Parameters
-
ackType_ | The acknowledgement type that the flush command should wait to receive, see Message.AckType. 'processed' matches the timeout only version of this function. persisted ensures all previous messages have been persisted. - Parameters
-
timeout | Number of milliseconds to wait for flush, where 0 indicates no timeout |
|
|
|
long | flush () |
|
long | flush (long timeout) |
| Clear the queued messages which may be waiting in the transport More...
|
|
void | setThreadCreatedHandler (ThreadCreatedHandler handler_) |
| Set a handler that is invoked immediately by any thread created by the transport. More...
|
|
void | setThreadCreatedHandler (Action handler_) |
| Set a handler that is invoked immediately by any thread created by the transport. More...
|
|
void | setTransportFilter (TransportFilter filter_) |
| Sets a TransportFilter that filters raw bytes bfeore send and after receive. More...
|
|
void | ack (byte[] topic, int topicPos, int topicLen, byte[] bookmark, int bookmarkPos, int bookmarkLen, byte[] options=null, int optionsPos=0, int optionsLen=0) |
| ACKs a message queue message. More...
|
|
void | ack (Field topic, Field bookmark, Field options=null) |
| ACKs a message queue message. More...
|
|
void | ack (String topic, String bookmark, String options=null) |
| ACKS a message queue message. More...
|
|
void | setAutoAck (bool isAutoAckEnabled) |
| Enables or disables auto-acking. When auto-acking is enabled any successful return from a message handler functiokn will result in an ACK (sow_delete) message sent to the server. Any thrown exception will result in a "cancel" ACK sent to the server. More...
|
|
bool | getAutoAck () |
| Returns the current setting of auto-acking. More...
|
|
void | setAckBatchSize (int batchSize) |
| Sets the current ACK batch size.The ACK batch size controls how many successful ACKs (which are sow_delete messages) are batched together before sending to the server.When combined with the "max_backlog" and MaxPerSubscriptionBacklog server configuration parameter, greater network efficiency can be achieved when using message queues.Setting this parameter causes calls to "ack" and successful auto-acks to be batched; unsuccessful/cancel acks are sent immediately. More...
|
|
int | getAckBatchSize () |
| Returns the current ACK batch size. See the documentation for setAckBatchSize(int). More...
|
|
void | setAckTimeout (long ackTimeout) |
| Sets the ack timeout – the maximum time to let a success ack be cached before sending. More...
|
|
long | getAckTimeout () |
| Returns the queue ack timeout. More...
|
|
void | flushAcks () |
| Sends any pending queue ACKs to the server. More...
|
|
CommandId | executeAsync (Command command, MessageHandler handler=null) |
| Execute the provided command and process responses on the client receive thread using the provided handler. More...
|
|
CommandId | executeAsync (Command command, Action< Message > action) |
| Execute the provided command on a background thread and provide messages received in response to the handler provided. More...
|
|
MessageStream | execute (Command command) |
| Execute the provided command and return messages received in response in a MessageStream. More...
|
|
void | Dispose () |
|