TIBCO eFTL™
|
A connection object represents a program's connection to an eFTL server. More...
Public Member Functions | |
void | Acknowledge (IMessage message) |
Acknowledge this message. More... | |
void | AcknowledgeAll (IMessage message) |
Acknowledge all messages up to and including this message. More... | |
IKVMap | CreateKVMap (String name) |
Create a IKVMap. More... | |
IMessage | CreateMessage () |
Create a IMessage. More... | |
void | Disconnect () |
Disconnect from the eFTL server. More... | |
String | GetClientId () |
Gets the client identifier for this connection. More... | |
bool | IsConnected () |
Determine whether this connection to the eFTL server is open or closed. More... | |
void | Publish (IMessage message) |
Publish a one-to-many message to all subscribing clients. More... | |
void | Publish (IMessage message, ICompletionListener listener) |
Publish a one-to-many message to all subscribing clients. More... | |
void | Reconnect (System.Collections.Hashtable props) |
Reopen a closed connection. More... | |
void | RemoveKVMap (String name) |
Remove a key-value map. More... | |
void | SendReply (IMessage reply, IMessage request, ICompletionListener listener) |
Send a reply message in response to a request message. More... | |
void | SendRequest (IMessage request, double timeout, IRequestListener listener) |
Publish a request message. More... | |
String | Subscribe (String matcher, ISubscriptionListener listener) |
Subscribe to messages. More... | |
String | Subscribe (String matcher, String durable, ISubscriptionListener listener) |
Create a durable subscriber to messages. More... | |
String | Subscribe (String matcher, String durable, Hashtable props, ISubscriptionListener listener) |
Create a durable subscriber to messages. More... | |
void | Unsubscribe (String subscriptionId) |
Close a subscription. More... | |
void | UnsubscribeAll () |
Close all subscriptions. More... | |
A connection object represents a program's connection to an eFTL server.
Programs use connection objects to create messages, send messages, and subscribe to messages.
Programs receive connection objects through IConnectionListener callbacks.
void TIBCO.EFTL.IConnection.Acknowledge | ( | IMessage | message | ) |
Acknowledge this message.
Messages consumed from subscriptions with a client acknowledgment mode must be explicitly acknowledged. The eFTL server will stop delivering messages to the client once the server's configured maximum number of unacknowledged messages is reached.
message | The message being acknowledged. |
Exception | The connection is not open. |
void TIBCO.EFTL.IConnection.AcknowledgeAll | ( | IMessage | message | ) |
Acknowledge all messages up to and including this message.
Messages consumed from subscriptions with a client acknowledgment mode must be explicitly acknowledged. The eFTL server will stop delivering messages to the client once the server's configured maximum number of unacknowledged messages is reached.
message | The message being acknowledged. |
Exception | The connection is not open. |
IKVMap TIBCO.EFTL.IConnection.CreateKVMap | ( | String | name | ) |
void TIBCO.EFTL.IConnection.Disconnect | ( | ) |
Disconnect from the eFTL server.
Programs may disconnect to free server resources.
This call returns immediately; disconnecting continues asynchronously. When the connection has closed, the eFTL library calls your IConnectionListener.OnDisconnect} callback.
String TIBCO.EFTL.IConnection.GetClientId | ( | ) |
Gets the client identifier for this connection.
.
bool TIBCO.EFTL.IConnection.IsConnected | ( | ) |
Determine whether this connection to the eFTL server is open or closed.
true
if this connection is open; false
otherwise. void TIBCO.EFTL.IConnection.Publish | ( | IMessage | message | ) |
Publish a one-to-many message to all subscribing clients.
message | Publish this message. |
Exception | The connection is not open. |
Exception | The message would exceed the eFTL server's maximum message size. |
void TIBCO.EFTL.IConnection.Publish | ( | IMessage | message, |
ICompletionListener | listener | ||
) |
Publish a one-to-many message to all subscribing clients.
This call returns immediately; publishing continues asynchronously. When the publish completes successfully, the eFTL library calls your ICompletionListener.OnCompletion callback.
message | Publish this message. |
listener | This listener defines callback methods for successful completion and for errors. |
Exception | The connection is not open. |
Exception | The message would exceed the eFTL server's maximum message size. |
void TIBCO.EFTL.IConnection.Reconnect | ( | System.Collections.Hashtable | props | ) |
Reopen a closed connection.
You may call this method within your IConnectionListener.OnDisconnect method.
This call returns immediately; connecting continues asynchronously. When the connection is ready to use, the eFTL library calls your IConnectionListener.OnReconnect callback.
Reconnecting automatically re-activates all subscriptions on the connection. The eFTL library invokes your ISubscriptionListener.OnSubscribe callback for each successful resubscription.
props | These properties affect the connection attempt. You must supply username and password credentials each time. All other properties remain stored from earlier connect and reconnect calls. New values overwrite stored values. |
void TIBCO.EFTL.IConnection.RemoveKVMap | ( | String | name | ) |
Remove a key-value map.
name | Key-value map name. |
void TIBCO.EFTL.IConnection.SendReply | ( | IMessage | reply, |
IMessage | request, | ||
ICompletionListener | listener | ||
) |
Send a reply message in response to a request message.
This call returns immediately. When the send completes successfully, the eFTL library calls your ICompletionListener.OnCompletion callback.
reply | The reply message to send. |
request | The request message. |
listener | This listener defines callback methods for successful completion and for errors. |
Exception | The connection is not open. |
Exception | The message would exceed the eFTL server's maximum message size. |
void TIBCO.EFTL.IConnection.SendRequest | ( | IMessage | request, |
double | timeout, | ||
IRequestListener | listener | ||
) |
Publish a request message.
This call returns immediately. When the reply is received the eFTL library calls your IRequestListener.OnReply callback.
request | The request message to publish. |
timeout | Seconds to wait for a reply. |
listener | This listener defines callback methods for successful completion and for errors. |
Exception | The connection is not open. |
Exception | The message would exceed the eFTL server's maximum message size. |
String TIBCO.EFTL.IConnection.Subscribe | ( | String | matcher, |
ISubscriptionListener | listener | ||
) |
Subscribe to messages.
Register a subscription for one-to-many messages.
This call returns immediately; subscribing continues asynchronously. When the subscription is ready to receive messages, the eFTL library calls your ISubscriptionListener.OnSubscribe callback.
A matcher can narrow subscription interest in the inbound message stream.
matcher | The subscription uses this content matcher to narrow the message stream. |
listener | This listener defines callback methods for successful subscription, message arrival, and errors. |
Exception | The connection is not open. |
String TIBCO.EFTL.IConnection.Subscribe | ( | String | matcher, |
String | durable, | ||
ISubscriptionListener | listener | ||
) |
Create a durable subscriber to messages.
Register a durable subscription for one-to-many messages.
This call returns immediately; subscribing continues asynchronously. When the subscription is ready to receive messages, the eFTL library calls your ISubscriptionListener.OnSubscribe callback.
A matcher can narrow subscription interest in the inbound message stream.
matcher | The subscription uses this matcher to narrow the message stream. |
durable | The subscription uses this durable name. |
listener | This listener defines callback methods for successful subscription, message arrival and errors. |
Exception | The connection is not open. |
String TIBCO.EFTL.IConnection.Subscribe | ( | String | matcher, |
String | durable, | ||
Hashtable | props, | ||
ISubscriptionListener | listener | ||
) |
Create a durable subscriber to messages.
Register a durable subscription for one-to-many messages.
This call returns immediately; subscribing continues asynchronously. When the subscription is ready to receive messages, the eFTL library calls your ISubscriptionListener.OnSubscribe callback.
A matcher can narrow subscription interest in the inbound message stream.
matcher | The subscription uses this matcher to narrow the message stream. |
durable | The subscription uses this durable name. |
props | These properties can be used to affect the subscription: |
listener | This listener defines callback methods for successful subscription, message arrival and errors. |
Exception | The connection is not open. |
void TIBCO.EFTL.IConnection.Unsubscribe | ( | String | subscriptionId | ) |
Close a subscription.
For durable subscriptions, this will cause the persistence service to remove the durable subscription as well, along with any persisted messages.
subscriptionId | Close this subscription. |
void TIBCO.EFTL.IConnection.UnsubscribeAll | ( | ) |
Close all subscriptions.
For durable subscriptions, this will cause the persistence service to remove the durable subscription as well, along with any persisted messages.