|
webMethods Broker Administration Java API Version 9.5.1.0.171 091713 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCOM.activesw.api.client.BrokerClient
public class BrokerClient
Representation of an Information Broker client.
Hostnames may include a ":port" on the end of them to indicate a specific (non-default) broker port.
Many calls say they can throw a "communications exception". These exceptions are:
Constructor Summary | |
---|---|
protected |
BrokerClient(java.lang.String broker_host,
java.lang.String broker_name,
java.lang.String client_id,
BrokerConnectionDescriptor desc)
Protected reconnect constructor. |
|
BrokerClient(java.lang.String broker_host,
java.lang.String broker_name,
java.lang.String client_id,
java.lang.String client_group,
java.lang.String app_name,
BrokerConnectionDescriptor desc)
Creates a client. |
Method Summary | |
---|---|
void |
acknowledge(long seqn)
Acknowledge the single event specified. |
void |
acknowledge(long[] seqn)
Acknowledge the array of events with the given seqn numbers. |
void |
acknowledge(long[] seqn,
long txid)
Acknowledge the array of events with the given seqn numbers, under the specified transaction id. |
void |
acknowledge(long seqn,
long txid)
Acknowledge the single event specified, under the specified transaction id. |
void |
acknowledgeThrough(long seqn)
Acknowledges all events through the event specified. |
void |
acknowledgeThrough(long seqn,
long txid)
Acknowledges all events through the event specified, under the specified transaction id. |
int |
beginAdapterTransaction(java.lang.String transaction_id,
int required_level,
java.lang.String[] participants,
boolean want_ack)
Publishes an Adapter::beginTransaction event for the given transaction ID. |
BrokerEvent[] |
browseEvents(int from_index,
int max_events,
BrokerFilterDescriptor[] filters)
Peek one or more events from the specified client's queue. |
void |
cancelCallbackForSubId(int sub_id)
Cancel the client's specific callback for a subscription id. |
void |
cancelCallbackForTag(int tag)
Cancel the client's specific callback for a tag value. |
void |
cancelCallbacks()
Cancel all callbacks for the client. |
void |
cancelCheckForEvents()
Cancel any pending check events request on the current client session. |
void |
cancelGetEvents()
|
void |
cancelSubscription(BrokerSubscription sub)
Cancel a subscription with matching event type and filter. |
void |
cancelSubscription(java.lang.String event_type_name,
java.lang.String filter)
Cancel a subscription with matching event type and filter. |
void |
cancelSubscriptions(BrokerSubscription[] subs)
Cancel multiple subscriptions with matching event types and filters. |
boolean |
canPublish(java.lang.String event_type_name)
Test if can publish or deliver an event of a given type. |
boolean |
canSubscribe(java.lang.String event_type_name)
Test if can subscribe to an event type, or have events of that type delivered to this client. |
void |
checkForEvents(int msecs)
Check for the availability of deliverable events on the client's queue. |
void |
clearQueue()
Clear all events from the client's queue. |
BrokerClientQueueBrowser |
createClientQueueBrowser()
Creates a queue browser on the current client's queue. |
void |
deliver(java.lang.String dest_id,
BrokerEvent event)
Deliver one event. |
void |
deliver(java.lang.String dest_id,
BrokerEvent[] events)
Deliver multiple events. |
protected void |
deliver(java.lang.String dest_id,
BrokerEvent[] events,
BrokerTransactionalClient tx_client)
Deliver multiple events on the given transaction. |
protected void |
deliver(java.lang.String dest_id,
BrokerEvent event,
BrokerTransactionalClient tx_client)
Deliver one event in the given transaction. |
void |
deliverAckReplyEvent(BrokerEvent request_event,
long publish_seqn)
Delivers an Adapter::ack event to the originator of the specified event, which is most likely a request event. |
protected void |
deliverAckReplyEvent(BrokerEvent request_event,
long publish_seqn,
BrokerTransactionalClient tx_client)
Delivers an Adapter::ack event to the originator of the specified event, which is most likely a request event for given transaction. |
void |
deliverErrorReplyEvent(BrokerEvent request_event,
BrokerEvent error_event)
/** Give a single error event to the broker to all be delivered to the client that published the 'request_event'. |
protected void |
deliverErrorReplyEvent(BrokerEvent request_event,
BrokerEvent error_event,
BrokerTransactionalClient tx_client)
Give a single error event to the broker to all be delivered to the client that published the 'request_event' for given transaction. |
void |
deliverNullReplyEvent(BrokerEvent request_event,
java.lang.String reply_event_type_name,
long publish_seqn)
Delivers a null event of type 'reply_event_type_name' to the originator of the specified event, which is most likely a request event. |
protected void |
deliverNullReplyEvent(BrokerEvent request_event,
java.lang.String reply_event_type_name,
long publish_seqn,
BrokerTransactionalClient tx_client)
Delivers a null event of type 'reply_event_type_name' to the originator of the specified event, which is most likely a request event for given transaction. |
int |
deliverPartialReplyEvents(BrokerEvent request_event,
BrokerEvent[] events,
int flag,
int token)
Give multiple events to the broker to all be delivered to the client that published the 'request_event'. |
protected int |
deliverPartialReplyEvents(BrokerEvent request_event,
BrokerEvent[] events,
int flag,
int token,
BrokerTransactionalClient tx_client)
Give multiple events to the broker to all be delivered to the client that published the 'request_event' for the given transaction. |
void |
deliverReplyEvent(BrokerEvent request_event,
BrokerEvent event)
Give a single event to the broker to all be delivered to the client that published the 'request_event'. |
protected void |
deliverReplyEvent(BrokerEvent request_event,
BrokerEvent event,
BrokerTransactionalClient tx_client)
Give a single event to the broker to all be delivered to the client that published the 'request_event' for the given transaction. |
void |
deliverReplyEvents(BrokerEvent request_event,
BrokerEvent[] events)
Give multiple events to the broker to all be delivered to the client that published the 'request_event'. |
void |
deliverReplyEvents(BrokerEvent request_event,
BrokerEvent[] events,
BrokerTransactionalClient tx_client)
Give multiple events to the broker to all be delivered to the client that published the 'request_event' for given transaction. |
BrokerEvent[] |
deliverRequestAndWait(java.lang.String dest_id,
BrokerEvent event,
int msecs)
Deliver one request event and wait for replies. |
void |
deliverWithAck(java.lang.String dest_id,
BrokerEvent[] events,
int ack_type,
long[] ack_seqn)
Deliver multiple events. |
protected void |
deliverWithAck(java.lang.String dest_id,
BrokerEvent[] events,
int ack_type,
long[] ack_seqn,
BrokerTransactionalClient tx_client)
Deliver multiple events on the given transaction. |
void |
destroy()
Destroy the client. |
void |
disconnect()
Disconnect the client. |
static void |
dispatch(int msecs)
This function gets the next incoming event and passes it to the proper callback method. |
boolean |
doesSubscriptionExist(java.lang.String event_type_name,
java.lang.String filter)
Checks to see if the given subscription exists. |
int |
endAdapterTransaction(java.lang.String transaction_id,
int mode,
boolean want_ack)
Publishes an Adapter::endTransaction event for the given transaction ID. |
protected void |
endExt(java.lang.String[] ext_ids,
int tx_state)
Ends the transaction |
protected void |
endTr(long[] tx_ids,
int tx_state)
|
protected void |
endTx(long[] tx_ids,
int tx_state)
Ends the transaction |
protected void |
finalize()
Called by Java when you stop using this object. |
protected void |
forgetExt(java.lang.String[] ext_ids)
|
protected void |
forgetTx(long[] tx_ids)
Forgets the transaction This can be called at any time, hence informing the broker that the the current transaction should be marked invalid. |
short[] |
getAccessLabel()
Get the access label for this client. |
java.lang.String |
getApiVersionNumber()
Get the current api's version number. |
java.lang.String |
getApplicationName()
Get the client's application name. |
COM.activesw.api.client.BrokerAsyncExceptionListener |
getAsyncExceptionListener()
Returns the asynchronous Broker exception listner. |
java.lang.String |
getBrokerHost()
Get the client's broker host name. |
java.lang.String |
getBrokerName()
Get the client's broker name. |
int |
getBrokerPort()
Get the client's broker host port. |
BrokerSSLCertificate |
getBrokerSSLCertificate()
Get the secure socket certificate for the broker. |
int |
getBrokerVersionNumber()
Get the broker's version number. |
java.lang.String |
getBrokerVersionString()
Get the broker's version string. |
java.lang.String[] |
getCanPublishNames()
Get the list of event type names which this client can publish or deliver. |
BrokerTypeDef[] |
getCanPublishTypeDefs()
Get the definitions for the the event types this client can publish or deliver. |
java.lang.String[] |
getCanSubscribeNames()
Get the list of event type names which this client can subscribe to or have delivered to it. |
BrokerTypeDef[] |
getCanSubscribeTypeDefs()
Get the definitions for the the event types this client can subscribe to or have delivered to it. |
java.lang.String |
getClientGroup()
Get the client's client group name. |
java.lang.String |
getClientId()
Get the client's identifier. |
BrokerClientInfo |
getClientInfo()
Get the current client's information. |
BrokerEvent |
getClientInfoset()
Get the infoset for this client. |
int |
getClientSSLEncryptionLevel()
Get the secure socket encryption level. |
BrokerConnectionDescriptor |
getConnectionDescriptor()
Get the client's connection descriptor as used when this object was created. |
static int |
getDefaultBrokerPort()
Get the default port number for connecting to brokers. |
static int |
getDefaultTimeout()
Gets the current default timeout for Broker requests. |
BrokerEvent |
getEvent(int msecs)
Gets a single event from this client's queue. |
protected BrokerEvent |
getEvent(int msecs,
BrokerTransactionalClient tx_client)
Gets a single event from this client's queue, that is part of the given open transaction context. |
boolean |
getEventLogging()
|
BrokerEvent[] |
getEvents(int max_events,
int msecs)
Gets one or more events from this client's queue. |
protected BrokerEvent[] |
getEvents(int max_events,
int msecs,
BrokerTransactionalClient tx_client)
Gets one or more events from this client's queue, that is a part of the the give open transaction context. |
BrokerEvent[] |
getEvents(int max_events,
long seqn,
int msecs)
The sequence number is the event to acknowledge through. |
protected BrokerEvent[] |
getEvents(int max_events,
long seqn,
int msecs,
BrokerTransactionalClient tx_client)
This request gets processed only after the given BrokerTransactionalClient is is committed. |
BrokerTypeDef |
getEventTypeDef(java.lang.String event_type_name)
Get the specified event type's definition. |
BrokerTypeDef[] |
getEventTypeDefs(java.lang.String[] event_type_names)
Get the definitions for the requested event types. |
BrokerEvent |
getEventTypeInfoset(java.lang.String event_type_name,
java.lang.String infoset_name)
Get the specified infoset for the specified event type. |
java.lang.String[] |
getEventTypeInfosetNames(java.lang.String event_type_name)
Get the list of infosets names for an event type. |
BrokerEvent[] |
getEventTypeInfosets(java.lang.String event_type_name,
java.lang.String[] infoset_names)
Get the requested infosets for the specified event type. |
java.lang.String[] |
getEventTypeNames()
Get the complete list of event type names from the broker. |
java.lang.String[] |
getEventTypeNames(java.lang.String scope_name)
Get the list of event type names from the broker which are a member of the specified event type scope. |
COM.activesw.api.client.BrokerJMSEvent |
getJMSClientInfoset()
|
COM.activesw.api.client.BrokerJMSEvent[] |
getJMSEvents(int max_events,
long seqn,
int msecs)
|
protected COM.activesw.api.client.BrokerJMSEvent[] |
getJMSEvents(int max_events,
long seqn,
int msecs,
BrokerTransactionalClient tx_client)
|
long |
getLastPublishSequenceNumber()
Get the highest sequence number used by this client in a publish or deliver call. |
java.lang.String[] |
getLogAcknowledgeNames()
Get the list of event types which can be logged when clients of this client group acknowledges them. |
java.lang.String[] |
getLogPublishNames()
Get the list of event types that are logged when published by clients of this client's client group. |
static java.lang.String |
getPlatformInfo(java.lang.String key)
Get a platform info value. |
static java.lang.String[] |
getPlatformInfoKeys()
Get the list of platform info keys. |
int |
getQueueLength()
Get the number of events currently in the client's queue. |
java.lang.String[] |
getScopeNames()
Get the complete list of event type scope names from the broker. |
java.util.Locale |
getServerFilterCollationLocale()
Returns the active Broker Server Filter Collation locale. |
int |
getSess()
System use only. |
BrokerFilterDescriptor[] |
getSessionFilters()
Get the current filter used for event retrieval operations. |
int |
getStateShareLimit()
Get the number of clients allowed to be connected using this client ID at one time. |
BrokerSubscription[] |
getSubscriptions()
Get the list of open subscriptions. |
java.lang.String |
getTerritoryName()
Get the territory name of the client's broker. |
protected int |
getTxTimeout(long tx_id)
|
void |
incrementRedeliveryCount(long seqn)
Increments the redelivery count on the single event specified. |
void |
interruptCheckForEvents()
Interrupt any blocked awCheckForEvents call on the current client session. |
static void |
interruptDispatch()
Interrupt the current dispatch call. |
void |
interruptGetEvents()
Interrupt the current getEvent call for the client. |
boolean |
isClientPending()
Check if any events are pending for the client. |
boolean |
isConnected()
Check if connected. |
static boolean |
isPending()
Check if any events are pending for any client. |
void |
jmsClientPublish(COM.activesw.api.client.BrokerJMSEvent[] events,
boolean async)
|
protected void |
jmsClientPublish(COM.activesw.api.client.BrokerJMSEvent[] events,
boolean async,
BrokerTransactionalClient tx_client)
|
static void |
mainLoop()
A limited main loop which executes until told to stop. |
int |
makeSubId()
Generates a subscription id. |
int |
makeTag()
Generate a unique value for use in the 'tag' envelope field. |
java.lang.String |
makeTransactionId()
Generate a unique transaction ID for use in transaction operations. |
int |
makeUniqueSubId()
Generates a unique subscription id. |
void |
negativeAcknowledge(long seqn)
Negative acknowledges the single event specified. |
void |
negativeAcknowledge(long[] seqn)
Negative acknowledges the events specified. |
protected void |
negativeAcknowledgeInternal(long[] seqn,
long tx_id)
|
static BrokerClient |
newOrReconnect(java.lang.String broker_host,
java.lang.String broker_name,
java.lang.String client_id,
java.lang.String client_group,
java.lang.String app_name,
BrokerConnectionDescriptor desc)
Attempts to create the client. |
void |
newSubscription(BrokerSubscription sub)
Subscribe to all events of a given event type. |
void |
newSubscription(int sub_id,
java.lang.String event_type_name,
java.lang.String filter)
Subscribe to all events of a given event type which match the specified filter. |
void |
newSubscription(java.lang.String event_type_name,
java.lang.String filter)
Subscribe to all events of a given event type which match the specified filter. |
void |
newSubscriptions(BrokerSubscription[] subs)
Open multiple subscriptions at one time. |
protected long |
newTx(java.lang.String external_id,
int existsFlag,
long timeout,
long tx_id)
Creates a transaction context that can be used to aggregate multiple publish and acknowledge operations into a single unit of work that can be committed or aborted atomically. |
void |
ping()
Checks for network connectivity to the Broker using the default client timeout. |
void |
ping(int msecs)
Checks for network connectivity to the Broker. |
static BrokerClientPoll[] |
poll(BrokerClientPoll[] polls,
int msecs)
Allows one or more clients to polled for pending operations, returning only after at least one client has a ready operation, the current thread is interrupted or the given timeout has expired. |
protected void |
prepareExt(java.lang.String[] ext_ids)
|
protected int |
prepareTx(long[] tx_ids)
Prepares the transaction |
void |
prime()
Tell the client to send a request for events but not block. |
void |
prime(int num)
Tell the client to send a request for events but not block. |
protected void |
prime(int num,
BrokerTransactionalClient tx_client)
|
static void |
primeAllClients()
Tell all clients to send a request for events but not block. |
static void |
primeAllClients(int num)
Tell all clients to send a request for events but not block. |
void |
primeWithAck(int num)
|
protected void |
primeWithAck(int num,
BrokerTransactionalClient tx_client)
|
void |
publish(BrokerEvent event)
Publish one event. |
void |
publish(BrokerEvent[] events)
Publish multiple events. |
protected void |
publish(BrokerEvent[] events,
BrokerTransactionalClient tx_client)
Publish multiple events on the given transaction. |
protected void |
publish(BrokerEvent event,
BrokerTransactionalClient tx_client)
Publish one event with the given transaction id. |
BrokerEvent[] |
publishRequestAndWait(BrokerEvent event,
int msecs)
Publish one request event to the broker and wait for replies. |
void |
publishWithAck(BrokerEvent[] events,
int ack_type,
long[] ack_seqn)
Publish multiple events. |
protected void |
publishWithAck(BrokerEvent[] events,
int ack_type,
long[] ack_seqn,
BrokerTransactionalClient tx_client)
Publish multiple events for the given transaction. |
static BrokerClient |
reconnect(java.lang.String broker_host,
java.lang.String broker_name,
java.lang.String client_id,
BrokerConnectionDescriptor desc)
Reconnects a client. |
protected java.lang.String[] |
recoverTx()
|
void |
registerCallback(BrokerCallback obj,
java.lang.Object client_data)
Register a general callback for events received by this client. |
void |
registerCallbackForSubId(int sub_id,
BrokerCallback obj,
java.lang.Object client_data)
Register a specific callback for events received by this client which matched a given subscription ID. |
void |
registerCallbackForTag(int tag,
boolean cancel_when_done,
BrokerCallback obj,
java.lang.Object client_data)
Register a specific callback for events received by this client which have the _env.tag field set to the specified value. |
void |
registerConnectionCallback(BrokerConnectionCallback obj,
java.lang.Object client_data)
Register a connection callback for this client. |
BrokerEvent[] |
resendUnacknowledgedEvents(long[] seqn)
A list of events with the given "seqn" numbers will be sent to the broker again since they had not been acknowledged so far. |
void |
resetSessionFilters()
Reset existing filters on the client session. |
void |
setAsyncExceptionListener(COM.activesw.api.client.BrokerAsyncExceptionListener listener)
Registers an asynchronous Broker exception listener. |
void |
setAutomaticControlLabel(boolean enabled)
Enable or disable automatic setting of the _env.controlLabel field. |
void |
setClientInfoset(BrokerEvent infoset)
Set the infoset for this client. |
static int |
setDefaultClientTimeout(int msecs)
Set the default timeout for broker requests. |
static void |
setPlatformInfo(java.lang.String key,
java.lang.String value)
Set a platform info value. |
void |
setSessionFilter(BrokerFilterDescriptor filter)
Set filter for event retrieval operations. |
void |
setSessionFilters(BrokerFilterDescriptor[] filter)
Set filters for event retrieval operations. |
void |
setStateShareLimit(int limit)
Set the number of clients which can be simultaneously connected using this client ID. |
protected void |
setTxId(long tx_id,
java.lang.String external_id)
Sets the Broker transaction's external identifier. |
protected void |
setTxTimeout(int seconds,
long tx_id)
|
static void |
stopMainLoop()
Interrupt the current mainLoop calls. |
static void |
threadedCallbacks(boolean enabled)
A convenience method to run the mainLoop method on another thread. |
java.lang.String |
toString()
Returns a string with the client information in a form suitable for human viewing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int VERSION_31
public static final int VERSION_40
public static final int VERSION_50
public static final int VERSION_60
public static final int VERSION_61
public static final int VERSION_62
public static final int VERSION_63
public static final int VERSION_64
public static final int VERSION_65
public static final int VERSION_66
public static final int VERSION_71
public static final int VERSION_80
public static final int VERSION_82
public static final int VERSION_90
public static final java.lang.String CURRENT_API_VERSION
public static final int REPLY_FLAG_START
public static final int REPLY_FLAG_CONTINUE
public static final int REPLY_FLAG_END
public static final int REPLY_FLAG_START_AND_END
public static final int CONNECT_STATE_DISCONNECTED
public static final int CONNECT_STATE_CONNECTED
public static final int CONNECT_STATE_RECONNECTED
public static final int TRANSACTION_LEVEL_ANY
public static final int TRANSACTION_LEVEL_PSEUDO
public static final int TRANSACTION_LEVEL_BASIC
public static final int TRANSACTION_LEVEL_CONVERSATIONAL
public static final int TRANSACTION_MODE_COMMIT
public static final int TRANSACTION_MODE_ROLLBACK
public static final int TRANSACTION_MODE_SAVEPOINT
public static final int DEFAULT_TIMEOUT
public static final int TIME_INFINITE
public static final int SYNCHRONOUS
public static final int DO_NOT_ACK
public static final int NO_SHARE_LIMIT
public static final int RECEIVE_SYNCHRONOUS
public static final int ACK_NONE
public static final int ACK_AUTOMATIC
public static final int ACK_THROUGH
public static final int ACK_SELECTIVE
protected int event_req_id
protected boolean browser_open
Constructor Detail |
---|
public BrokerClient(java.lang.String broker_host, java.lang.String broker_name, java.lang.String client_id, java.lang.String client_group, java.lang.String app_name, BrokerConnectionDescriptor desc) throws BrokerException
BrokerClientExistsException
- If a client using the specified client ID already exists.
BrokerCommFailureException
- If problems occur establishing the connection.
BrokerHostNotFoundException
- If the specified host does not exist.
BrokerInvalidClientIdException
- If the ID contains illegal characters.
BrokerInvalidNameException
- If the app_name contains illegal characters.
BrokerNoPermissionException
- If permission to join the specified client group is denied.
BrokerNotRunningException
- If the host exists but no broker is running on that host.
BrokerNullParameterException
- If broker_host, client_group, or app_name are null.
BrokerSecurityException
- If a secure connection is attempted but is rejected by the broker.
BrokerUnknownBrokerNameException
- If the specified broker does not exist. If broker_name is null, this indicates that there is no default broker.
BrokerUnknownClientGroupException
- If the specified client group does not exist on the broker.
BrokerException
protected BrokerClient(java.lang.String broker_host, java.lang.String broker_name, java.lang.String client_id, BrokerConnectionDescriptor desc) throws BrokerException
BrokerException
Method Detail |
---|
public static BrokerClient reconnect(java.lang.String broker_host, java.lang.String broker_name, java.lang.String client_id, BrokerConnectionDescriptor desc) throws BrokerException
BrokerClientContentionException
- If the client ID is already in use by another client. For shared state clients, this means the maximum number of reconnects has been
exceeded.
BrokerCommFailureException
- If problems occur establishing the connection.
BrokerHostNotFoundException
- If the specified host does not exist.
BrokerNoPermissionException
- If permission to join the specified client group is denied.
BrokerNotRunningException
- If the host exists but no broker is running on that host.
BrokerNullParameterException
- If broker_host or client_id are null.
BrokerSecurityException
- If a secure connection is attempted but is rejected by the broker.
BrokerUnknownBrokerNameException
- If the specified broker does not exist. If broker_name is null, this indicates that there is no default broker.
BrokerUnknownClientIdException
- If the specified client ID does not exist on the broker.
BrokerException
public static BrokerClient newOrReconnect(java.lang.String broker_host, java.lang.String broker_name, java.lang.String client_id, java.lang.String client_group, java.lang.String app_name, BrokerConnectionDescriptor desc) throws BrokerException
BrokerClientContentionException
- If the client ID is already in use by another client. For shared state clients, this means the maximum number of reconnects has been
exceeded.
BrokerCommFailureException
- If problems occur establishing the connection.
BrokerHostNotFoundException
- If the specified host does not exist.
BrokerInvalidClientIdException
- If the ID contains illegal characters.
BrokerNoPermissionException
- If permission to join the specified client group is denied.
BrokerNotRunningException
- If the host exists but no broker is running on that host.
BrokerNullParameterException
- If broker_host, client_id, client_group, or app_name are null.
BrokerSecurityException
- If a secure connection is attempted but is rejected by the broker.
BrokerUnknownBrokerNameException
- If the specified broker does not exist. If broker_name is null, this indicates that there is no default broker.
BrokerUnknownClientGroupException
- If the specified client group does not exist on the broker.
BrokerUnknownClientIdException
- If the specified client ID does not exist on the broker.
BrokerException
public java.lang.String getBrokerHost()
public int getBrokerPort()
public java.lang.String getTerritoryName() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public java.lang.String getBrokerName() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public java.lang.String getClientGroup()
public java.lang.String getClientId()
public java.lang.String getApplicationName()
public int getBrokerVersionNumber()
If the broker is newer than the client's version, the client's version is reported.
public java.lang.String getBrokerVersionString()
If the broker is newer than the client's version, the client's version is reported.
public java.lang.String getApiVersionNumber()
public BrokerConnectionDescriptor getConnectionDescriptor()
public BrokerClientInfo getClientInfo() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNoPermissionException
- If the client does not have permission to browse the specified client.
BrokerNullParameterException
- If client_id is null.
BrokerUnknownClientIdException
- If the client does not exist on the broker.
BrokerException
public void destroy() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void disconnect() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
protected void finalize()
finalize
in class java.lang.Object
public void ping() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void ping(int msecs) throws BrokerException
msecs
- The amount of time, in milliseconds, to wait for a response from the Broker.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1.
BrokerException
public boolean isConnected()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean canPublish(java.lang.String event_type_name) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNullParameterException
- If event_type_name is null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public void publish(BrokerEvent event) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish the event type.
BrokerNullParameterException
- If event is null.
BrokerUnknownEventTypeException
- If the event type for the event does not exist on the broker.
BrokerException
protected void publish(BrokerEvent event, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish the event type.
BrokerNullParameterException
- If event is null.
BrokerUnknownEventTypeException
- If the event type for the event does not exist on the broker.
BrokerException
public void publish(BrokerEvent[] events) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If events is null, or if any element in the array is null.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerException
public void jmsClientPublish(COM.activesw.api.client.BrokerJMSEvent[] events, boolean async) throws BrokerException
BrokerException
protected void publish(BrokerEvent[] events, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If events is null, or if any element in the array is null.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerException
protected void jmsClientPublish(COM.activesw.api.client.BrokerJMSEvent[] events, boolean async, BrokerTransactionalClient tx_client) throws BrokerException
BrokerException
public void publishWithAck(BrokerEvent[] events, int ack_type, long[] ack_seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If events is null, or if any element in the array is null.
BrokerOutOfRangeException
- If the ack_type is not a legal ACK_* value.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerInvalidAcknowledgementException
- If ack_seqn if not a valid event to acknowledge. Events are not published.
BrokerException
protected void publishWithAck(BrokerEvent[] events, int ack_type, long[] ack_seqn, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If events is null, or if any element in the array is null.
BrokerOutOfRangeException
- If the ack_type is not a legal ACK_* value.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerInvalidAcknowledgementException
- If ack_seqn if not a valid event to acknowledge. Events are not published.
BrokerException
public void deliver(java.lang.String dest_id, BrokerEvent event) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If the event does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish the event type.
BrokerNullParameterException
- If event or dest_id are null.
BrokerUnknownEventTypeException
- If the event type for the event does not exist on the broker.
BrokerException
protected void deliver(java.lang.String dest_id, BrokerEvent event, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If the event does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish the event type.
BrokerNullParameterException
- If event or dest_id are null.
BrokerUnknownEventTypeException
- If the event type for the event does not exist on the broker.
BrokerException
public void deliver(java.lang.String dest_id, BrokerEvent[] events) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If dest_id or events are null, or if any element in the array is null.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerException
protected void deliver(java.lang.String dest_id, BrokerEvent[] events, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If dest_id or events are null, or if any element in the array is null.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerException
public void deliverWithAck(java.lang.String dest_id, BrokerEvent[] events, int ack_type, long[] ack_seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If dest_id or events are null, or if any element in the array is null.
BrokerOutOfRangeException
- If the ack_type is not a legal ACK_* value.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerInvalidAcknowledgementException
- If ack_seqn if not a valid event to acknowledge. Events are not published.
BrokerException
protected void deliverWithAck(java.lang.String dest_id, BrokerEvent[] events, int ack_type, long[] ack_seqn, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If any of the events does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish all of the event types.
BrokerNullParameterException
- If dest_id or events are null, or if any element in the array is null.
BrokerOutOfRangeException
- If the ack_type is not a legal ACK_* value.
BrokerUnknownEventTypeException
- If the event type for any of the events does not exist on the broker.
BrokerInvalidAcknowledgementException
- If ack_seqn if not a valid event to acknowledge. Events are not published.
BrokerException
public BrokerEvent[] publishRequestAndWait(BrokerEvent event, int msecs) throws BrokerException
Note: This operation is intended for use only for clients which are using the callback model. It does not work properly for clients which are using the getEvents model. It also only works properly when responses will be returned from only one client due to the request.
BrokerBadStateException
- If this is called from within a callback function.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish the event type.
BrokerNullParameterException
- If event is null.
BrokerUnknownEventTypeException
- If the event type for the event does not exist on the broker.
BrokerException
public BrokerEvent[] deliverRequestAndWait(java.lang.String dest_id, BrokerEvent event, int msecs) throws BrokerException
Note: This operation is intended for use only for clients which are using the callback model. It does not work properly for clients which are using the getEvents model. It also only works properly when responses will be returned from only one client due to the request.
BrokerBadStateException
- If this is called from within a callback function.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidClientIdException
- If the destination ID includes invalid characters.
BrokerInvalidEventException
- If the event does not match its type definition.
BrokerNoPermissionException
- If the client does not have permission to publish the event type.
BrokerNullParameterException
- If dest_id or event are null.
BrokerUnknownEventTypeException
- If the event type for the event does not exist on the broker.
BrokerException
public void deliverAckReplyEvent(BrokerEvent request_event, long publish_seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event was not received from the broker.
BrokerNoPermissionException
- If the client does not have permission to publish the Adapter::ack event type.
BrokerNullParameterException
- If request_event is null.
BrokerException
protected void deliverAckReplyEvent(BrokerEvent request_event, long publish_seqn, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event was not received from the broker.
BrokerNoPermissionException
- If the client does not have permission to publish the Adapter::ack event type.
BrokerNullParameterException
- If request_event is null.
BrokerException
public void deliverNullReplyEvent(BrokerEvent request_event, java.lang.String reply_event_type_name, long publish_seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event was not received from the broker.
BrokerNoPermissionException
- If the client does not have permission to publish the reply event type.
BrokerNullParameterException
- If request_event or reply_event_type_name are null.
BrokerUnknownEventTypeException
- If the event type for the reply event does not exist on the broker.
BrokerException
protected void deliverNullReplyEvent(BrokerEvent request_event, java.lang.String reply_event_type_name, long publish_seqn, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the event was not received from the broker.
BrokerNoPermissionException
- If the client does not have permission to publish the reply event type.
BrokerNullParameterException
- If request_event or reply_event_type_name are null.
BrokerUnknownEventTypeException
- If the event type for the reply event does not exist on the broker.
BrokerException
public void deliverErrorReplyEvent(BrokerEvent request_event, BrokerEvent error_event) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or the reply event does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish the reply event type.
BrokerNullParameterException
- If request_event or event are null.
BrokerUnknownEventTypeException
- If the event type for the reply event does not exist on the broker.
BrokerException
protected void deliverErrorReplyEvent(BrokerEvent request_event, BrokerEvent error_event, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or the reply event does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish the reply event type.
BrokerNullParameterException
- If request_event or event are null.
BrokerUnknownEventTypeException
- If the event type for the reply event does not exist on the broker.
BrokerException
public void deliverReplyEvent(BrokerEvent request_event, BrokerEvent event) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or the reply event does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish the reply event type.
BrokerNullParameterException
- If request_event or event are null.
BrokerUnknownEventTypeException
- If the event type for the reply event does not exist on the broker.
BrokerException
protected void deliverReplyEvent(BrokerEvent request_event, BrokerEvent event, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or the reply event does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish the reply event type.
BrokerNullParameterException
- If request_event or event are null.
BrokerUnknownEventTypeException
- If the event type for the reply event does not exist on the broker.
BrokerException
public void deliverReplyEvents(BrokerEvent request_event, BrokerEvent[] events) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or any of the reply events does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish all of the reply events.
BrokerNullParameterException
- If request_event or events are null, or if any element in the events array is null.
BrokerUnknownEventTypeException
- If the event type for any of the reply events does not exist on the broker.
BrokerException
public void deliverReplyEvents(BrokerEvent request_event, BrokerEvent[] events, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or any of the reply events does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish all of the reply events.
BrokerNullParameterException
- If request_event or events are null, or if any element in the events array is null.
BrokerUnknownEventTypeException
- If the event type for any of the reply events does not exist on the broker.
BrokerException
public int deliverPartialReplyEvents(BrokerEvent request_event, BrokerEvent[] events, int flag, int token) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or any of the reply events does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish all of the reply events.
BrokerNullParameterException
- If request_event or events are null, or if any element in the events array is null.
BrokerOutOfRangeException
- If flag is not a valid value.
BrokerUnknownEventTypeException
- If the event type for any of the reply events does not exist on the broker.
BrokerException
protected int deliverPartialReplyEvents(BrokerEvent request_event, BrokerEvent[] events, int flag, int token, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidEventException
- If the request event was not received from the broker, or any of the reply events does not match its event type.
BrokerNoPermissionException
- If the client does not have permission to publish all of the reply events.
BrokerNullParameterException
- If request_event or events are null, or if any element in the events array is null.
BrokerOutOfRangeException
- If flag is not a valid value.
BrokerUnknownEventTypeException
- If the event type for any of the reply events does not exist on the broker.
BrokerException
public int beginAdapterTransaction(java.lang.String transaction_id, int required_level, java.lang.String[] participants, boolean want_ack) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNoPermissionException
- If the client does not have permission to publish the Adapter::beginTransaction event type.
BrokerNullParameterException
- If transaction_id is null, or if any entry in participants is null.
BrokerException
public int endAdapterTransaction(java.lang.String transaction_id, int mode, boolean want_ack) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNoPermissionException
- If the client does not have permission to publish the Adapter::endTransaction event type.
BrokerNullParameterException
- If transaction_id is null.
BrokerOutOfRangeException
- If mode is not a legal value.
BrokerException
public long getLastPublishSequenceNumber() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public boolean canSubscribe(java.lang.String event_type_name) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNullParameterException
- If event_type_name is null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public void newSubscription(java.lang.String event_type_name, java.lang.String filter) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If the filter string contains a parse error.
BrokerNoPermissionException
- If the client does not have permission to subscribe to the event type.
BrokerNullParameterException
- If event_type_name is null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public void newSubscription(int sub_id, java.lang.String event_type_name, java.lang.String filter) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If the filter string contains a parse error.
BrokerNoPermissionException
- If the client does not have permission to subscribe to the event type.
BrokerNullParameterException
- If event_type_name is null.
BrokerOutOfRangeException
- If sub_id is less than zero.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public void newSubscription(BrokerSubscription sub) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If the filter string contains a parse error.
BrokerNoPermissionException
- If the client does not have permission to subscribe to the event type.
BrokerNullParameterException
- If sub.event_type_name is null.
BrokerOutOfRangeException
- If sub.sub_id is less than zero.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public void newSubscriptions(BrokerSubscription[] subs) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If any filter string contains a parse error.
BrokerNoPermissionException
- If the client does not have permission to subscribe to all the event types.
BrokerNullParameterException
- If subs is null, or if any of the subscription event_type_name fields are null.
BrokerOutOfRangeException
- If any of the subscription's sub_id fields are less than zero.
BrokerUnknownEventTypeException
- If any of the event types do not exist on the broker.
BrokerException
public void cancelSubscription(java.lang.String event_type_name, java.lang.String filter) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If there is no existing subscription that matches.
BrokerNullParameterException
- If event_type_name is null.
BrokerException
public void cancelSubscription(BrokerSubscription sub) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If there is no existing subscription that matches.
BrokerNullParameterException
- If sub or sub.event_type_name are null.
BrokerException
public void cancelSubscriptions(BrokerSubscription[] subs) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException
- If there is no existing subscription that matches one or more of the subscriptions.
BrokerNullParameterException
- If subs is null, if any array element is null, or if any array element's event_type_name field is null.
BrokerException
public BrokerSubscription[] getSubscriptions() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public boolean doesSubscriptionExist(java.lang.String event_type_name, java.lang.String filter) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public int makeSubId()
public int makeUniqueSubId() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public int makeTag()
public java.lang.String makeTransactionId() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void checkForEvents(int msecs) throws BrokerException
BrokerInterruptedException
- If interruptCheckForEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInvalidOperationException
- If the client already has a pending check or get event request
BrokerOutOfRangeException
- If msecs is less than -1.
BrokerTimeoutException
- If the timeout is reached before an event arrives.
BrokerException
public void interruptCheckForEvents() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void cancelCheckForEvents() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void cancelGetEvents() throws BrokerException
BrokerException
public BrokerEvent getEvent(int msecs) throws BrokerException
Caution should be used when calling this method simultaneously from the same client on multiple threads. An event received on one thread may be
acknowledged by another thread. To insure proper acknowledgement handling getEvents(int, long, int)
should be used in this
situation.
In addition to the listed exceptions, any communications exception can be thrown.
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1.
BrokerTimeoutException
- If the timeout is reached before an event arrives.
BrokerException
protected BrokerEvent getEvent(int msecs, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1.
BrokerTimeoutException
- If the timeout is reached before an event arrives.
BrokerException
public BrokerEvent[] getEvents(int max_events, int msecs) throws BrokerException
Caution should be used when calling this method simultaneously from the same client on multiple threads. An event received on one thread may be
acknowledged by another thread. To insure proper acknowledgement handling getEvents(int, long, int)
should be used in this
situation.
The number of events being returned is not guaranteed to be 'max_events' even if there are more than than many events in the client's queue. Any number of events up to the value of 'max_events' may be returned. In addition to the listed exceptions, any communications exception can be thrown.
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1, or max_events is less than zero.
BrokerTimeoutException
- If the timeout is reached before any events arrive.
BrokerException
protected BrokerEvent[] getEvents(int max_events, int msecs, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1, or max_events is less than zero.
BrokerTimeoutException
- If the timeout is reached before any events arrive.
BrokerException
public BrokerEvent[] getEvents(int max_events, long seqn, int msecs) throws BrokerException
Caution should be used when calling this method simultaneously from the same client on multiple threads when seqn is 0. An event received on one thread may be acknowledged by another thread.
The number of events being returned is not guaranteed to be 'max_events' even if there are more than than many events in the client's queue. Any number of events up to the value of 'max_events' may be returned. In addition to the listed exceptions, any communications exception can be thrown.
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1, or max_events is less than zero, or seqn is less than -1.
BrokerTimeoutException
- If the timeout is reached before any events arrive.
BrokerException
public COM.activesw.api.client.BrokerJMSEvent[] getJMSEvents(int max_events, long seqn, int msecs) throws BrokerException
BrokerException
protected BrokerEvent[] getEvents(int max_events, long seqn, int msecs, BrokerTransactionalClient tx_client) throws BrokerException
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1, or max_events is less than zero, or seqn is less than -1.
BrokerTimeoutException
- If the timeout is reached before any events arrive.
BrokerException
protected COM.activesw.api.client.BrokerJMSEvent[] getJMSEvents(int max_events, long seqn, int msecs, BrokerTransactionalClient tx_client) throws BrokerException
BrokerException
public BrokerEvent[] browseEvents(int from_index, int max_events, BrokerFilterDescriptor[] filters) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If the max_events or from_index is out of range.
BrokerTimeoutException
- If the timeout is reached before any events arrive.
BrokerException
public BrokerEvent[] resendUnacknowledgedEvents(long[] seqn) throws BrokerException
BrokerInterruptedException
- If interruptGetEvents is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If you have duplicate/invalid seqn#
BrokerException
public void incrementRedeliveryCount(long seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If you have a negative seqn#
BrokerInvalidOperationException
- If you try to manually increment redelivery counts for a client that has automatic increments
BrokerInvalidSequenceNumberException
- If you supply a sequence number that does not correspond to a received event.
BrokerException
public void negativeAcknowledge(long seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If you have a negative seqn#
BrokerInvalidOperationException
- If you try to manually increment redelivery counts for a client that has automatic increments
BrokerInvalidSequenceNumberException
- If you supply a sequence number that does not correspond to a received event.
BrokerException
public void negativeAcknowledge(long[] seqn) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If you have a negative seqn#
BrokerInvalidOperationException
- If you try to manually increment redelivery counts for a client that has automatic increments
BrokerInvalidSequenceNumberException
- If you supply a sequence number that does not correspond to a received event.
BrokerException
protected void negativeAcknowledgeInternal(long[] seqn, long tx_id) throws BrokerException
BrokerException
public void interruptGetEvents() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void registerCallback(BrokerCallback obj, java.lang.Object client_data) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNullParameterException
- If obj is null.
BrokerException
public void registerCallbackForSubId(int sub_id, BrokerCallback obj, java.lang.Object client_data) throws BrokerException
BrokerBadStateException
- If no general callback has been registered.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNullParameterException
- If obj is null.
BrokerOutOfRangeException
- If sub_id is less than zero.
BrokerException
public void registerCallbackForTag(int tag, boolean cancel_when_done, BrokerCallback obj, java.lang.Object client_data) throws BrokerException
BrokerBadStateException
- If no general callback has been registered.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNullParameterException
- If obj is null.
BrokerException
public void cancelCallbacks() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void cancelCallbackForSubId(int sub_id) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void cancelCallbackForTag(int tag) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public static BrokerClientPoll[] poll(BrokerClientPoll[] polls, int msecs) throws BrokerException
If one of the clients' requested operations is BrokerClientPoll.GET_EVENTS
and there is not already an outstanding Broker event request then
prime(1)
will automatically be called for the client. If more than one event is required then it is the caller's responsibility to
call prime
on each of the Broker clients with the required number of events.
BrokerNullParameterException
- If polls is null.
BrokerOutOfRangeException
- If msecs is less than -1.
BrokerTimeoutException
- If the timeout is reached before any requested operations are ready.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerInterruptedException
- If the poll thread is interrupted.
BrokerException
public static void dispatch(int msecs) throws BrokerException
BrokerBadStateException
- If this is called from within a callback function.
BrokerInterruptedException
- If interruptDispatch is used to stop the call.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If msecs is less than -1.
BrokerTimeoutException
- If the timeout is reached before any events arrive.
BrokerException
public static void interruptDispatch() throws BrokerException
BrokerException
public static void mainLoop() throws BrokerException
BrokerBadStateException
- If this is called from within a callback function.
BrokerException
public static void stopMainLoop() throws BrokerException
BrokerException
public static void threadedCallbacks(boolean enabled) throws BrokerException
BrokerException
public boolean isClientPending() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public static boolean isPending() throws BrokerException
BrokerException
public void prime() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void prime(int num) throws BrokerException
num
- The requested number of events.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void primeWithAck(int num) throws BrokerException
BrokerException
protected void prime(int num, BrokerTransactionalClient tx_client) throws BrokerException
BrokerException
protected void primeWithAck(int num, BrokerTransactionalClient tx_client) throws BrokerException
BrokerException
public static void primeAllClients() throws BrokerException
BrokerException
public static void primeAllClients(int num) throws BrokerException
num
- The requested number of events.
BrokerException
public void acknowledge(long seqn) throws BrokerException
BrokerInvalidAcknowledgementException
- If seqn is not a valid event to acknowledge.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If seqn is less than zero.
BrokerException
public void acknowledge(long seqn, long txid) throws BrokerException
BrokerInvalidAcknowledgementException
- If seqn is not a valid event to acknowledge.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If seqn is less than zero.
BrokerException
public void acknowledge(long[] seqn) throws BrokerException
BrokerInvalidAcknowledgementException
- If seqn is not a valid event to acknowledge.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If seqn is less than zero.
BrokerException
public void acknowledge(long[] seqn, long txid) throws BrokerException
BrokerInvalidAcknowledgementException
- If seqn is not a valid event to acknowledge.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If seqn is less than zero.
BrokerException
public void acknowledgeThrough(long seqn) throws BrokerException
BrokerInvalidAcknowledgementException
- If seqn is not a valid event to acknowledge.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If seqn is less than zero.
BrokerException
public void acknowledgeThrough(long seqn, long txid) throws BrokerException
BrokerInvalidAcknowledgementException
- If seqn is not a valid event to acknowledge.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerOutOfRangeException
- If seqn is less than zero.
BrokerException
public int getQueueLength() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void clearQueue() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public int getStateShareLimit() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public void setStateShareLimit(int limit) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNoPermissionException
- If the client is not a shared state client.
BrokerOutOfRangeException
- If limit is zero or less than -1.
BrokerException
public short[] getAccessLabel() throws BrokerException
BrokerBadStateException
- If the client has an owner, but the access label feature is not enabled.
BrokerFailureException
- If the client has an owner, but an error occurred looking up the access label.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerNoPermissionException
- If the client does not have an owner, so it cannot have an access label.
BrokerException
public int getClientSSLEncryptionLevel() throws BrokerException
BrokerBadStateException
- If the client is not using a secure socket connection.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public BrokerSSLCertificate getBrokerSSLCertificate() throws BrokerException
BrokerBadStateException
- If the client is not using a secure socket connection.
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
public java.lang.String[] getScopeNames() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public java.lang.String[] getEventTypeNames() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public java.lang.String[] getEventTypeNames(java.lang.String scope_name) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerNullParameterException
- If scope_name is null.
BrokerUnknownEventTypeException
- If no event types exist in the specified scope on the broker.
BrokerException
public java.lang.String[] getCanPublishNames() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public java.lang.String[] getCanSubscribeNames() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public java.lang.String[] getLogPublishNames() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public java.lang.String[] getLogAcknowledgeNames() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public boolean getEventLogging() throws BrokerException
BrokerException
public BrokerTypeDef getEventTypeDef(java.lang.String event_type_name) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerNoPermissionException
- If the client does not have permission to browse the event type. Normally a client has permission to browse an event type it can publish
or subscribe to.
BrokerNullParameterException
- If event_type_name is null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public BrokerTypeDef[] getEventTypeDefs(java.lang.String[] event_type_names) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerNullParameterException
- If event_type_names or any entry in that array is null.
BrokerException
public BrokerTypeDef[] getCanPublishTypeDefs() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public BrokerTypeDef[] getCanSubscribeTypeDefs() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public BrokerEvent getEventTypeInfoset(java.lang.String event_type_name, java.lang.String infoset_name) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerNoPermissionException
- If the infoset is not named "public" and the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException
- If event_type_name or infoset_name are null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerUnknownInfosetException
- If the infoset does not exist on the specified event type in the broker.
BrokerException
public BrokerEvent[] getEventTypeInfosets(java.lang.String event_type_name, java.lang.String[] infoset_names) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerNullParameterException
- If event_type_name or infoset_name are null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public java.lang.String[] getEventTypeInfosetNames(java.lang.String event_type_name) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerNoPermissionException
- If the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException
- If event_type_name is null.
BrokerUnknownEventTypeException
- If the event type does not exist on the broker.
BrokerException
public BrokerEvent getClientInfoset() throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public COM.activesw.api.client.BrokerJMSEvent getJMSClientInfoset() throws BrokerException
BrokerException
public void setClientInfoset(BrokerEvent infoset) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerInvalidEventTypeNameException
- If the infoset name includes colons.
BrokerNullParameterException
- If infoset is null.
BrokerException
public void setAutomaticControlLabel(boolean enabled) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public void registerConnectionCallback(BrokerConnectionCallback obj, java.lang.Object client_data) throws BrokerException
BrokerInvalidClientException
- If the client has been disconnected or destroyed.
BrokerException
public static int getDefaultBrokerPort()
public static int getDefaultTimeout()
public static int setDefaultClientTimeout(int msecs)
public static java.lang.String[] getPlatformInfoKeys()
public static java.lang.String getPlatformInfo(java.lang.String key) throws BrokerException
BrokerNullParameterException
- If key is null.
BrokerUnknownKeyException
- If the key does not exist in the platform info.
BrokerException
public static void setPlatformInfo(java.lang.String key, java.lang.String value) throws BrokerException
BrokerNoPermissionException
- If the key refers to read-only platform information.
BrokerNullParameterException
- If key or value are null.
BrokerException
public int getSess()
protected long newTx(java.lang.String external_id, int existsFlag, long timeout, long tx_id) throws BrokerException
external_id
- (optional) A user defined transaction identifier
BrokerException
protected void endTr(long[] tx_ids, int tx_state) throws BrokerException
BrokerException
protected void endTx(long[] tx_ids, int tx_state) throws BrokerException
tx_ids
- the transaction identifierstx_state
- TX_END_COMMIT | TX_END_ABORT
BrokerException
protected void endExt(java.lang.String[] ext_ids, int tx_state) throws BrokerException
ext_ids
- the transaction identifierstx_state
- TX_END_COMMIT | TX_END_ABORT
BrokerException
protected void prepareExt(java.lang.String[] ext_ids) throws BrokerException
BrokerException
protected int prepareTx(long[] tx_ids) throws BrokerException
tx_ids
- the transaction identifiers
BrokerException
protected void setTxId(long tx_id, java.lang.String external_id) throws BrokerException
tx_id
- a Broker transaction identifierexternal_id
- an externally generated identifier
BrokerInvalidTxException
- if the transaction is not found, the transaction is not open or if an external identifier already exists for the transaction.
BrokerException
- for all other errors.protected void forgetTx(long[] tx_ids) throws BrokerException
tx_ids
- the transaction identifiers
BrokerException
protected void forgetExt(java.lang.String[] ext_ids) throws BrokerException
BrokerException
protected java.lang.String[] recoverTx() throws BrokerException
BrokerException
protected void setTxTimeout(int seconds, long tx_id) throws BrokerException
BrokerException
protected int getTxTimeout(long tx_id) throws BrokerException
BrokerException
public void resetSessionFilters() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed.
BrokerNoPermissionException
- If the client has limited access.
BrokerNullParameterException
- If description is null.
BrokerUnknownEventTypeException
- If no events exist in the specified scope on the broker.
BrokerInvalidFilterException
- If the specified filter expression is invalid.
BrokerException
public void setSessionFilter(BrokerFilterDescriptor filter) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed.
BrokerNoPermissionException
- If the client has limited access.
BrokerNullParameterException
- If description is null.
BrokerUnknownEventTypeException
- If no events exist in the specified scope on the broker.
BrokerInvalidFilterException
- If the specified filter expression is invalid.
BrokerException
public void setSessionFilters(BrokerFilterDescriptor[] filter) throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed.
BrokerNoPermissionException
- If the client has limited access.
BrokerNullParameterException
- If description is null.
BrokerUnknownEventTypeException
- If no events exist in the specified scope on the broker.
BrokerInvalidFilterException
- If the specified filter expression is invalid.
BrokerException
public BrokerFilterDescriptor[] getSessionFilters() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed.
BrokerFilterNotSetException
- If the client does not have any filter set for event retrieval operation.
BrokerException
public java.util.Locale getServerFilterCollationLocale() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed.
BrokerNoPermissionException
- If the client has limited access.
BrokerNullParameterException
- If description is null.
BrokerInvalidNameException
- If the locale name is invalid.
BrokerException
public void setAsyncExceptionListener(COM.activesw.api.client.BrokerAsyncExceptionListener listener)
listener
- the exception listenerpublic COM.activesw.api.client.BrokerAsyncExceptionListener getAsyncExceptionListener()
public BrokerClientQueueBrowser createClientQueueBrowser() throws BrokerException
BrokerInvalidClientException
- If the client has been destroyed or disconnected.
BrokerException
|
webMethods Broker Administration Java API Version 9.5.1.0.171 091713 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |