webMethods Broker Administration Java API
Version 9.5.1.0.171 091713

COM.activesw.api.client
Class BrokerAdminClient

java.lang.Object
  extended by COM.activesw.api.client.BrokerClient
      extended by COM.activesw.api.client.BrokerAdminClient

public class BrokerAdminClient
extends BrokerClient

Representation of an Information Broker administrative client.

Many calls say they can throw a "communications exception". These exceptions are:

BrokerCommFailureException
If a networking error occurs.
BrokerConnectionClosedException
If the broker disconnects from the application.
BrokerFailureException
If an error occurs on the broker which prevents the operation from being completed.
BrokerProtocolException
If an error occurs in communication between the broker and the application.
BrokerTimeoutException
If the request was not handled in a reasonable time. Most operations use the default timeout of 30 seconds.


Field Summary
static int AUTH_TYPE_NONE
           
static int AUTH_TYPE_SSL
           
static int DEFAULT_STAT_PACKET_LENGTH
           
static int LIFECYCLE_DESTROY_ON_DISCONNECT
           
static int LIFECYCLE_EXPLICIT_DESTROY
           
static int RECOVER_GLOBAL
           
static int RECOVER_RESTRICTED
           
static int TRANSACTION_COMMIT
           
static int TRANSACTION_END_SUCCESS
           
static int TRANSACTION_FAILING
           
static int TRANSACTION_FINISHING
           
static int TRANSACTION_HEURISTIC_COMMIT
           
static int TRANSACTION_HEURISTIC_ROLLBACK
           
static int TRANSACTION_OPEN
           
static int TRANSACTION_PREPARED
           
static int TRANSACTION_PREPARING
           
static int TRANSACTION_ROLLBACK
           
static int TRANSACTION_ROLLBACK_ONLY
           
static int TRANSACTION_UNKNOWN
           
 
Fields inherited from class COM.activesw.api.client.BrokerClient
ACK_AUTOMATIC, ACK_NONE, ACK_SELECTIVE, ACK_THROUGH, browser_open, CONNECT_STATE_CONNECTED, CONNECT_STATE_DISCONNECTED, CONNECT_STATE_RECONNECTED, CURRENT_API_VERSION, DEFAULT_TIMEOUT, DO_NOT_ACK, event_req_id, NO_SHARE_LIMIT, RECEIVE_SYNCHRONOUS, REPLY_FLAG_CONTINUE, REPLY_FLAG_END, REPLY_FLAG_START, REPLY_FLAG_START_AND_END, SYNCHRONOUS, TIME_INFINITE, TRANSACTION_LEVEL_ANY, TRANSACTION_LEVEL_BASIC, TRANSACTION_LEVEL_CONVERSATIONAL, TRANSACTION_LEVEL_PSEUDO, TRANSACTION_MODE_COMMIT, TRANSACTION_MODE_ROLLBACK, TRANSACTION_MODE_SAVEPOINT, VERSION_31, VERSION_40, VERSION_50, VERSION_60, VERSION_61, VERSION_62, VERSION_63, VERSION_64, VERSION_65, VERSION_66, VERSION_71, VERSION_80, VERSION_82, VERSION_90
 
Constructor Summary
protected BrokerAdminClient(java.lang.String broker_host, java.lang.String broker_name, java.lang.String client_id, BrokerConnectionDescriptor desc)
          Protected reconnect constructor.
  BrokerAdminClient(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 an administrative client.
 
Method Summary
 void abortForced(long tx_id)
          Forcibly abort a transaction.
 void abortForced(long[] tx_ids)
          Forcibly abort a list of transactions.
 BrokerChangeLockInfo acquireChangeLock()
          Acquire the per-Broker change lock.
 BrokerJoinFailureInfo addBrokerToCluster(java.lang.String broker_host, java.lang.String broker_name)
          Have this broker join the cluster of the specified other broker.
 int checkAndRestartForwarding()
          Check for inactivity and restart forwarding documemnts on all territory and gateway brokers on this broker.
 int checkAndRestartForwarding(java.lang.String remote_broker_name)
          Check for inactivity and restart forwarding documemnts across the specfied territory or gateway broker.
 void clearClientQueueById(java.lang.String client_id)
          Clear all events from the client's queue.
 void commitForced(long tx_id)
          Forcibly commit a transaction.
 void commitForced(long[] tx_ids)
          Forcibly commit a list of transactions.
 void createClient(java.lang.String client_id, java.lang.String client_group, java.lang.String app_name, java.lang.String user_name, java.lang.String authenticator_name, BrokerConnectionDescriptor desc)
          Create a new client on the broker.
 void createClientGroup(java.lang.String client_group_name, int life_cycle, int storage_type)
          Create a client group on the broker.
 BrokerClientQueueBrowser createClientQueueBrowser(java.lang.String client_id)
          Creates a queue browser on the specified client.
 void createClientSubscriptionById(java.lang.String client_id, BrokerSubscription sub)
          Create a subscription for the client to all events of a given event type which match the specified filter.
 void createClientSubscriptionsById(java.lang.String client_id, BrokerSubscription[] subs)
          Open multiple subscriptions for a client at one time.
 void createCluster(java.lang.String clusterName)
          Create a new cluster with this broker as the first member.
 void createClusterGateway(java.lang.String cluster_name, java.lang.String broker_host, java.lang.String broker_name, boolean isPrimary)
          Create a gateway to the specified cluster by having the current broker communicate with the broker specified by broker_host and broker_name.
 BrokerQueueBrowser createForwardQueueBrowser(java.lang.String remoteBroker)
          Creates a queue browser on the forwarding queue of the specified remote broker.
 BrokerLockedClientQueueBrowser createLockedClientQueueBrowser(java.lang.String client_id)
          Creates a locked queue browser on the specified client.
 BrokerLockedQueueBrowser createLockedForwardQueueBrowser(java.lang.String remoteBroker)
          Creates a locked queue browser on the forwarding queue of the specified remote broker.
 void createTerritory(java.lang.String territory_name)
          Create a new territory with this broker as the first member.
 void createTerritoryGateway(java.lang.String territory_name, java.lang.String broker_host, java.lang.String broker_name)
          Create a gateway to the specified territory by having the current broker communicate with the broker specified by broker_host and broker_name.
 int deleteLogEvents(int from_index, int num_events)
          Deletes one or more events from the broker's log.
 void destroyBroker()
          Destroy this Broker.
 void destroyClientById(java.lang.String client_id)
          Destroy the specified client.
 void destroyClientGroup(java.lang.String client_group_name, boolean force_destroy)
          Destroy the named client group.
 void destroyClientSubscriptionById(java.lang.String client_id, BrokerSubscription sub)
          Cancel a subscription for a client with matching event type and filter.
 void destroyClientSubscriptionsById(java.lang.String client_id, BrokerSubscription[] subs)
          Cancel multiple subscriptions for a client with matching event types and filters.
 void destroyClusterGateway(java.lang.String cluster_name, java.lang.String broker_name)
          Destroy a gateway to the specified cluster.
 void destroyEventType(java.lang.String event_type_name, boolean force_destroy)
          Destroy the named event type.
 void destroyEventTypeInfoset(java.lang.String event_type_name, java.lang.String infoset_name)
          Destroy the specified infoset for the specified event type.
 void destroyEventTypeInfosets(java.lang.String event_type_name, java.lang.String[] infoset_names)
          Destroy the specified infosets for the specified event type.
 void destroyEventTypes(java.lang.String[] event_type_names, boolean force_destroy)
          Destroy the named event types.
 void destroyTerritoryGateway(java.lang.String territory_name)
          Destroy a gateway to the specified territory.
 void disconnectClientById(java.lang.String client_id)
          Disconnect all sessions for the specified client.
 void disconnectClientSessionById(java.lang.String client_id, int session_id)
          Disconnect the specified session for the specified client.
 boolean doesClientSubscriptionExistById(java.lang.String client_id, java.lang.String event_type_name, java.lang.String filter)
          Test if a subscription exists on the client with the given event type name and filter.
 void forgetForced()
          Forcibly purge all heuristic transactions.
 void forgetForced(long tx_id)
          Forcibly purge a heuristic transaction.
 void forgetForced(long[] tx_ids)
          Forcibly purge a list of heuristic transactions.
 BrokerTraceEvent[] getActivityTraces(int seqn, int msecs)
          Get an array of broker activity traces.
 BrokerClusterGatewayInfo[] getAllClusterGateways()
          Get the list of clusters accessible from this broker either through local gateways or gateways from other brokers.
 BrokerAllQueueStat[] getAllQueueStats()
          Get All client's statistics.
 BrokerTerritoryGatewayInfo[] getAllTerritoryGateways()
          Get the list of territories accessible from this broker either through local gateways or gateways from other brokers.
 java.lang.String getBrokerDescription()
          Get the broker description
 BrokerInfo[] getBrokersInCluster()
          Get the list of brokers in the cluster, including this broker.
 BrokerInfo[] getBrokersInTerritory()
          Get the list of brokers in the territory, including this broker.
 BrokerEvent getBrokerStats()
          Get the Broker statistics.
 BrokerAccessControlList getClientGroupACL(java.lang.String client_group_name)
          Get the specified client group's access control list (ACL).
 java.lang.String[] getClientGroupCanPublishList(java.lang.String client_group_name)
          Get the list of event types the client group can publish or deliver.
 java.lang.String[] getClientGroupCanSubscribeList(java.lang.String client_group_name)
          Get the list of event types the client group can subscribe to or have delivered to it.
 BrokerClientGroupInfo getClientGroupInfo(java.lang.String client_group_name)
          Get the specified client group's information.
 BrokerClientGroupInfo[] getClientGroupInfos(java.lang.String[] client_group_names)
          Get the client group information for the requested client groups.
 java.lang.String[] getClientGroupLogAcknowledgeList(java.lang.String client_group_name)
          Get the list of event types that are logged when they are acknowledged by a client in the the specified client group.
 java.lang.String[] getClientGroupLogPublishList(java.lang.String client_group_name)
          Get the list of event types that are logged when published or delivered by a client in the the specified client group.
 java.lang.String[] getClientGroupNames()
          Get the list of client group names from the broker.
 BrokerEvent getClientGroupStats(java.lang.String client_group_name)
          Get the specified client group's statistics.
 java.lang.String[] getClientGroupsWhichCanLogAcknowledge(java.lang.String event_type_name)
          Get the list of client groups which can log acknowledgement of the specified event type.
 java.lang.String[] getClientGroupsWhichCanLogPublish(java.lang.String event_type_name)
          Get the list of client groups which can log publish of the specified event type.
 java.lang.String[] getClientGroupsWhichCanPublish(java.lang.String event_type_name)
          Get the list of client groups which can publish the specified event type.
 java.lang.String[] getClientGroupsWhichCanSubscribe(java.lang.String event_type_name)
          Get the list of client groups which can subscribe the specified event type.
 java.lang.String[] getClientIds()
          Get the IDs of all the clients in the Broker.
 java.lang.String[] getClientIdsByClientGroup(java.lang.String client_group_name)
          Get the IDs of all the clients in the Broker which are members of the specified client group.
 java.lang.String[] getClientIdsWhichAreSubscribed(java.lang.String event_type_name)
          Get the IDs of all the clients in the Broker which are subscribed to the specified event type.
 BrokerClientInfo getClientInfoById(java.lang.String client_id)
          Get the specified client's information.
 BrokerClientInfo[] getClientInfosById(java.lang.String[] client_ids)
          Get the client information for the requested clients.
 BrokerEvent getClientInfosetById(java.lang.String client_id)
          Get the infoset for this client.
 BrokerClientQueueBrowserInfo[] getClientQueueBrowsers(java.lang.String client_id)
          Gets the list of QueueBrowsers opened by the specified client.
 BrokerEvent getClientStatsById(java.lang.String client_id)
          Get a client's statistics.
 BrokerEvent[] getClientStatsByIds(java.lang.String[] client_ids)
          Get statistics for the list of client IDs.
 BrokerSubscription[] getClientSubscriptionsById(java.lang.String client_id)
          Get the list of open subscriptions for a client.
 BrokerAccessControlList getClusterACL()
          Get the access control list (ACL) which brokers in the cluster are using to accept connections from other brokers in their cluster.
 BrokerAccessControlList getClusterGatewayACL(java.lang.String cluster_name)
          Get the access control list (ACL) which this broker is using to accept connections from the other broker across the gateway.
 int getClusterGatewayKeepAlive(java.lang.String cluster_name)
          Returns KeepAlive interval on the gateway.
 boolean getClusterGatewayRefuseAllUpdates(java.lang.String cluster_name)
          Returns whether a cluster gateway refuses all updates.
 BrokerSharedEventTypeInfo[] getClusterGatewaySharedEventTypes(java.lang.String cluster_name, java.lang.String broker_name)
          Get the information on event types shared across a cluster gateway.
 BrokerEvent getClusterGatewayStats(java.lang.String cluster_name, java.lang.String broker_name)
          Get the cluster gateway statistics.
 BrokerClusterInfo getClusterInfo()
          Get the cluster's settings.
 boolean getClusterStaticGatewayForwarding(java.lang.String cluster_name)
          Get current static gateway forwarding status.
 BrokerEvent getClusterStats()
          Get the cluster statistics.
 BrokerAdminTypeDef getEventAdminTypeDef(java.lang.String event_type_name)
          Get the specified event type's definition.
 BrokerAdminTypeDef[] getEventAdminTypeDefs(java.lang.String[] event_type_names)
          Get the definitions for the requested event types.
 BrokerAdminTypeDef[] getEventAdminTypeDefsByScope(java.lang.String scope_name)
          Get the definitions for the event types within the named scope.
 boolean getEventLogging()
           
 BrokerEvent getEventTypeStats(java.lang.String event_type_name)
          Get statistics for an event type.
 BrokerEvent getHeuristicTransactions()
          Get the list of heuristic transactions in the Broker transaction manager.
 BrokerClusterGatewayInfo[] getLocalClusterGateways()
          Get the list of clusters this broker is a gateway for.
 BrokerTerritoryGatewayInfo[] getLocalTerritoryGateways()
          Get the list of territories this broker is a gateway for.
 BrokerEvent[] getLogEvents(int from_index, int max_events, int msecs)
          Gets one or more events from the brokers event log at the given zero-based index.
 int getLogLength()
          Returns the number of events in the broker's log.
 int getPostPrepareTimeout()
          Get the default post-prepare timeout.
 int getPostPrepareTimeoutAction()
          Get the post-prepare timeout action.
 int getPrePrepareTimeout()
          Get the default pre-prepare timeout.
 int getRecoverMode()
          Gets the global recover mode.
 int getRemoteBrokerKeepAlive(java.lang.String broker_name)
          Returns KeepAlive interval for a remote broker.
 boolean getStaticGatewayForwarding(java.lang.String territory_name)
          Get current static gateway forwarding status.
 BrokerAccessControlList getTerritoryACL()
          Get the access control list (ACL) which brokers in the territory are using to accept connections from other brokers in their territory.
 BrokerAccessControlList getTerritoryGatewayACL(java.lang.String territory_name)
          Get the access control list (ACL) which this broker is using to accept connections from the other broker across the gateway.
 int getTerritoryGatewayKeepAlive(java.lang.String territory_name)
          Returns KeepAlive interval on the gateway.
 boolean getTerritoryGatewayRefuseAllUpdates(java.lang.String territory_name)
          Returns whether a territory gateway refuses all updates.
 BrokerSharedEventTypeRefuseUpdateInfo[] getTerritoryGatewayRefuseEventTypeUpdates(java.lang.String territory_name)
          Returns which event types a territory gateway refuses updates for.
 BrokerSharedEventTypeInfo[] getTerritoryGatewaySharedEventTypes(java.lang.String territory_name)
          Get the information on event types shared across a territory gateway.
 BrokerEvent getTerritoryGatewayStats(java.lang.String territory_name)
          Get the territory gateway statistics.
 BrokerTerritoryInfo getTerritoryInfo()
          Get the territory's settings.
 BrokerEvent getTerritoryStats()
          Get the territory statistics.
 BrokerEvent getTransactions()
          Get the list of current transactions in the Broker transaction manager.
 BrokerEvent getTransactionsByClient(java.lang.String client_id)
          Get the list of a client's transactions in the Broker transaction manager.
 BrokerJoinFailureInfo joinTerritory(java.lang.String broker_host, java.lang.String broker_name)
          Have this broker join the territory of the specified other broker.
 void leaveCluster(int msecs, boolean forced)
          Make this broker leave its current cluster.
 void leaveTerritory(int msecs, boolean forced)
          Make this broker leave its current territory.
static BrokerAdminClient newOrReconnectAdmin(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 administrative client.
static BrokerAdminClient reconnectAdmin(java.lang.String broker_host, java.lang.String broker_name, java.lang.String client_id, BrokerConnectionDescriptor desc)
          Reconnects an administrative client.
 void releaseChangeLock()
          Release the per-Broker change lock.
 void removeBrokerFromCluster(java.lang.String broker_host, java.lang.String broker_name)
          Force the removal of a given broker from the cluster.
 void removeBrokerFromTerritory(java.lang.String broker_host, java.lang.String broker_name)
          Force the removal of a given broker from the territory.
 void setBrokerDescription(java.lang.String description)
          Set the broker description
 void setClientGroupAccessLabelRequired(java.lang.String client_group_name, boolean required)
          Set whether or not an access label is required for connecting to a client group.
 void setClientGroupACL(java.lang.String client_group_name, BrokerAccessControlList acl)
          Set the specified client group's access control list (ACL).
 void setClientGroupCanPublishList(java.lang.String client_group_name, java.lang.String[] event_type_names)
          Set the list of event types the client group can publish to deliver.
 void setClientGroupCanSubscribeList(java.lang.String client_group_name, java.lang.String[] event_type_names)
          Set the list of event types the client group can subscribe to or have delivered to it.
 void setClientGroupDescription(java.lang.String client_group_name, java.lang.String description)
          Set the description string for a client group.
 void setClientGroupLogAcknowledgeList(java.lang.String client_group_name, java.lang.String[] event_type_names)
          Set the list of event types that are logged when acknowledged by a client in the the specified client group.
 void setClientGroupLogPublishList(java.lang.String client_group_name, java.lang.String[] event_type_names)
          Set the list of event types that are logged when published or delivered by a client in the the specified client group.
 void setClientGroupRequiredEncryption(java.lang.String client_group_name, int level)
          Set the required encryption for a client group.
 void setClientInfosetById(java.lang.String client_id, BrokerEvent infoset)
          Set the infoset for a client.
 void setClientLastPublishSequenceNumberById(java.lang.String client_id, long seqn)
          Set a client's high publisher sequence number.
 void setClientStateShareLimitById(java.lang.String client_id, int limit)
          Set a client's state share limit.
 void setClusterACL(BrokerAccessControlList acl)
          Set the access control list (ACL) which brokers in this cluster will use to accept connections from other brokers in the cluster.
 void setClusterGatewayACL(java.lang.String cluster_name, java.lang.String broker_name, BrokerAccessControlList acl)
          Set the access control list (ACL) which this broker will use to accept connections from the other broker across the gateway.
 void setClusterGatewayKeepAlive(java.lang.String cluster_name, java.lang.String broker_name, int KeepAlive)
          Sets or disables KeepAlive interval on the gateway.
 void setClusterGatewayPause(java.lang.String cluster_name, java.lang.String broker_name, boolean pause)
          Pauses or resumes a cluster gateway
 void setClusterGatewayRefuseAllUpdates(java.lang.String cluster_name, java.lang.String broker_name, boolean refuse_updates)
          Sets whether a cluster gateway refuses all updates.
 void setClusterGatewaySecurity(java.lang.String cluster_name, java.lang.String broker_name, int auth_type, int encrypt_level)
          Set the type of security used for the Cluster gateway.
 void setClusterGatewaySharedEventTypes(java.lang.String cluster_name, java.lang.String broker_name, BrokerSharedEventTypeInfo[] infos)
          Set the complete list of shared event types on a cluster gateway.
 void setClusterPrimaryGateway(java.lang.String cluster_name, java.lang.String broker_name)
          Set the gateway connection to the input cluster and broker as the Primary Cluster gateway from this Broker to the remote cluster.
 void setClusterSecurity(int auth_type, int encrypt_level)
          Set the type of security used in the cluster.
 void setClusterStaticGatewayForwarding(java.lang.String cluster_name, java.lang.String broker_name, boolean enable)
          Enable or disable static gateway forwarding,
 void setEventAdminTypeDef(BrokerAdminTypeDef type_def)
          Set the specified event type's definition.
 void setEventAdminTypeDefs(BrokerAdminTypeDef[] type_defs)
          Set the specified event type definitions.
 void setEventLogging(boolean enabled)
           
 void setEventTypeInfoset(java.lang.String event_type_name, java.lang.String infoset_name, BrokerEvent infoset)
          Set the specified infoset for an event type.
 void setEventTypeInfosets(java.lang.String event_type_name, BrokerEvent[] infosets)
          Set the specified infosets for the specified event type.
 BrokerSetFailureInfo setEventTypesAndClientGroups(java.lang.String[] event_type_names_to_destroy, java.lang.String[] client_group_names_to_destroy, BrokerCompleteEventType[] event_types, BrokerCompleteClientGroup[] client_groups, boolean forced)
          Creates, modifies, and destroys event types and client groups as an atomic operation.
protected  void setLogFilter(java.lang.String event_name, java.lang.String filter_expr)
          Allows filtering of log content.
protected  void setLogFilters(BrokerFilter[] filters)
          Allows filtering of log content.
 void setPostPrepareTimeout(int timeout_secs)
          Set the default post-prepare timeout.
 void setPostPrepareTimeoutAction(int action)
          Set the post-prepare timeout action.
 void setPrePrepareTimeout(int timeout_secs)
          Set the default pre-prepare timeout.
 void setRecoverMode(int mode)
          Sets the global recover mode to either restricted (the default) or global.
 void setRemoteBrokerKeepAlive(java.lang.String broker_name, int KeepAlive)
          Sets or disables KeepAlive interval for the remote broker.
 void setStaticGatewayForwarding(java.lang.String territory_name, boolean enable)
          Enable or disable static gateway forwarding,
 void setTerritoryACL(BrokerAccessControlList acl)
          Set the access control list (ACL) which brokers in this territory will use to accept connections from other brokers in the territory.
 void setTerritoryGatewayACL(java.lang.String territory_name, BrokerAccessControlList acl)
          Set the access control list (ACL) which this broker will use to accept connections from the other broker across the gateway.
 void setTerritoryGatewayKeepAlive(java.lang.String territory_name, int KeepAlive)
          Sets or disables KeepAlive interval on the gateway.
 void setTerritoryGatewayPause(java.lang.String territory_name, boolean pause)
          Pauses or resumes gateway
 void setTerritoryGatewayRefuseAllUpdates(java.lang.String territory_name, boolean refuse_updates)
          Sets whether a territory gateway refuses all updates.
 void setTerritoryGatewayRefuseEventTypeUpdates(java.lang.String territory_name, BrokerSharedEventTypeRefuseUpdateInfo[] infos)
          Sets which event types a territory gateway refuses updates for.
 void setTerritoryGatewaySecurity(java.lang.String territory_name, int auth_type, int encrypt_level)
          Set the type of security used for the territory gateway.
 void setTerritoryGatewaySharedEventTypes(java.lang.String territory_name, BrokerSharedEventTypeInfo[] infos)
          Set the complete list of shared event types on a territory gateway.
 void setTerritorySecurity(int auth_type, int encrypt_level)
          Set the type of security used in the territory.
static java.lang.String transactionStateToString(int state)
          Returns a String object representing the specified Broker Transaction Manager's transaction state.
 
Methods inherited from class COM.activesw.api.client.BrokerClient
acknowledge, acknowledge, acknowledge, acknowledge, acknowledgeThrough, acknowledgeThrough, beginAdapterTransaction, browseEvents, cancelCallbackForSubId, cancelCallbackForTag, cancelCallbacks, cancelCheckForEvents, cancelGetEvents, cancelSubscription, cancelSubscription, cancelSubscriptions, canPublish, canSubscribe, checkForEvents, clearQueue, createClientQueueBrowser, deliver, deliver, deliver, deliver, deliverAckReplyEvent, deliverAckReplyEvent, deliverErrorReplyEvent, deliverErrorReplyEvent, deliverNullReplyEvent, deliverNullReplyEvent, deliverPartialReplyEvents, deliverPartialReplyEvents, deliverReplyEvent, deliverReplyEvent, deliverReplyEvents, deliverReplyEvents, deliverRequestAndWait, deliverWithAck, deliverWithAck, destroy, disconnect, dispatch, doesSubscriptionExist, endAdapterTransaction, endExt, endTr, endTx, finalize, forgetExt, forgetTx, getAccessLabel, getApiVersionNumber, getApplicationName, getAsyncExceptionListener, getBrokerHost, getBrokerName, getBrokerPort, getBrokerSSLCertificate, getBrokerVersionNumber, getBrokerVersionString, getCanPublishNames, getCanPublishTypeDefs, getCanSubscribeNames, getCanSubscribeTypeDefs, getClientGroup, getClientId, getClientInfo, getClientInfoset, getClientSSLEncryptionLevel, getConnectionDescriptor, getDefaultBrokerPort, getDefaultTimeout, getEvent, getEvent, getEvents, getEvents, getEvents, getEvents, getEventTypeDef, getEventTypeDefs, getEventTypeInfoset, getEventTypeInfosetNames, getEventTypeInfosets, getEventTypeNames, getEventTypeNames, getJMSClientInfoset, getJMSEvents, getJMSEvents, getLastPublishSequenceNumber, getLogAcknowledgeNames, getLogPublishNames, getPlatformInfo, getPlatformInfoKeys, getQueueLength, getScopeNames, getServerFilterCollationLocale, getSess, getSessionFilters, getStateShareLimit, getSubscriptions, getTerritoryName, getTxTimeout, incrementRedeliveryCount, interruptCheckForEvents, interruptDispatch, interruptGetEvents, isClientPending, isConnected, isPending, jmsClientPublish, jmsClientPublish, mainLoop, makeSubId, makeTag, makeTransactionId, makeUniqueSubId, negativeAcknowledge, negativeAcknowledge, negativeAcknowledgeInternal, newOrReconnect, newSubscription, newSubscription, newSubscription, newSubscriptions, newTx, ping, ping, poll, prepareExt, prepareTx, prime, prime, prime, primeAllClients, primeAllClients, primeWithAck, primeWithAck, publish, publish, publish, publish, publishRequestAndWait, publishWithAck, publishWithAck, reconnect, recoverTx, registerCallback, registerCallbackForSubId, registerCallbackForTag, registerConnectionCallback, resendUnacknowledgedEvents, resetSessionFilters, setAsyncExceptionListener, setAutomaticControlLabel, setClientInfoset, setDefaultClientTimeout, setPlatformInfo, setSessionFilter, setSessionFilters, setStateShareLimit, setTxId, setTxTimeout, stopMainLoop, threadedCallbacks, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LIFECYCLE_DESTROY_ON_DISCONNECT

public static final int LIFECYCLE_DESTROY_ON_DISCONNECT
See Also:
Constant Field Values

LIFECYCLE_EXPLICIT_DESTROY

public static final int LIFECYCLE_EXPLICIT_DESTROY
See Also:
Constant Field Values

AUTH_TYPE_NONE

public static final int AUTH_TYPE_NONE
See Also:
Constant Field Values

AUTH_TYPE_SSL

public static final int AUTH_TYPE_SSL
See Also:
Constant Field Values

TRANSACTION_OPEN

public static final int TRANSACTION_OPEN
See Also:
Constant Field Values

TRANSACTION_COMMIT

public static final int TRANSACTION_COMMIT
See Also:
Constant Field Values

TRANSACTION_ROLLBACK

public static final int TRANSACTION_ROLLBACK
See Also:
Constant Field Values

TRANSACTION_END_SUCCESS

public static final int TRANSACTION_END_SUCCESS
See Also:
Constant Field Values

TRANSACTION_ROLLBACK_ONLY

public static final int TRANSACTION_ROLLBACK_ONLY
See Also:
Constant Field Values

TRANSACTION_PREPARED

public static final int TRANSACTION_PREPARED
See Also:
Constant Field Values

TRANSACTION_HEURISTIC_COMMIT

public static final int TRANSACTION_HEURISTIC_COMMIT
See Also:
Constant Field Values

TRANSACTION_HEURISTIC_ROLLBACK

public static final int TRANSACTION_HEURISTIC_ROLLBACK
See Also:
Constant Field Values

TRANSACTION_FAILING

public static final int TRANSACTION_FAILING
See Also:
Constant Field Values

TRANSACTION_PREPARING

public static final int TRANSACTION_PREPARING
See Also:
Constant Field Values

TRANSACTION_FINISHING

public static final int TRANSACTION_FINISHING
See Also:
Constant Field Values

TRANSACTION_UNKNOWN

public static final int TRANSACTION_UNKNOWN
See Also:
Constant Field Values

DEFAULT_STAT_PACKET_LENGTH

public static final int DEFAULT_STAT_PACKET_LENGTH
See Also:
Constant Field Values

RECOVER_RESTRICTED

public static final int RECOVER_RESTRICTED
See Also:
Constant Field Values

RECOVER_GLOBAL

public static final int RECOVER_GLOBAL
See Also:
Constant Field Values
Constructor Detail

BrokerAdminClient

public BrokerAdminClient(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
Creates an administrative client. This is a normal BrokerClient in all ways except that special administrative functions are available to the client. 'broker_name' can be null to request the default broker. 'client_id' can be null to request the broker to create an identifier (usually used with destroy-on-disconnect clients). 'desc' can be null to create a default connection.

Throws:
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.
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

BrokerAdminClient

protected BrokerAdminClient(java.lang.String broker_host,
                            java.lang.String broker_name,
                            java.lang.String client_id,
                            BrokerConnectionDescriptor desc)
                     throws BrokerException
Protected reconnect constructor. See reconnect() for details.

Throws:
BrokerException
Method Detail

reconnectAdmin

public static BrokerAdminClient reconnectAdmin(java.lang.String broker_host,
                                               java.lang.String broker_name,
                                               java.lang.String client_id,
                                               BrokerConnectionDescriptor desc)
                                        throws BrokerException
Reconnects an administrative client. 'broker_name' can be null to request the default broker. 'desc' can be null to request a default connection. The state sharing flag in the descriptor is ignored by this call. Whether or not the client shares state can only be set when making a new client. For non-shared state clients, only one active connection can be made to the broker for a given client_id, so an error can be returned on reconnect if the client_id is already in use. For clients with shared state, multiple reconnects to the client_id can be made, but an error can be returned if the share limit is exceeded.

Throws:
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 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

newOrReconnectAdmin

public static BrokerAdminClient newOrReconnectAdmin(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
Attempts to create the administrative client. If the creation fails because the client already exists, then it reconnects to the client instead. 'broker_name' can be NULL to request the default broker. 'desc' can be NULL to request a default connection. The state sharing flag in the descriptor is ignored if the client already exists. Whether or not the client shares state can only be set when making a new client.

Throws:
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

createClientGroup

public void createClientGroup(java.lang.String client_group_name,
                              int life_cycle,
                              int storage_type)
                       throws BrokerException
Create a client group on the broker. The can publish, can subscribe, and access control list are empty and must be set separately. Once created, the client group's life cycle and storage type cannot be changed. The life cycle values are LIFECYCLE_* and the storage type values are BrokerTypeDef.STORAGE_*.

Throws:
BrokerClientGroupExistsException - If a client group with the specified name already exists.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidClientGroupNameException - If the client group name is not valid.
BrokerNoPermissionException - If the client does not have permission create a client group. This requires client group modify permission
BrokerNullParameterException - If client_group_name is null.
BrokerOutOfRangeException - If the life cycle or storage type are not a valid values.
BrokerException

destroyClientGroup

public void destroyClientGroup(java.lang.String client_group_name,
                               boolean force_destroy)
                        throws BrokerException
Destroy the named client group. If the force_destroy flag is true, then any clients using the client group are destroyed. If the flag is false, then an error is returned if any clients exist which are members of the client group. Use getClientIdsByClientGroup() to get the list of clients using the client group.

Throws:
BrokerDependencyException - If force_destroy is false and there are clients which are members of the client group.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

getClientGroupNames

public java.lang.String[] getClientGroupNames()
                                       throws BrokerException
Get the list of client group names from the broker. Only returns client groups which this client can browse. Clients can always browse their own client group.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerException

getClientGroupsWhichCanPublish

public java.lang.String[] getClientGroupsWhichCanPublish(java.lang.String event_type_name)
                                                  throws BrokerException
Get the list of client groups which can publish the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.

Throws:
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

getClientGroupsWhichCanSubscribe

public java.lang.String[] getClientGroupsWhichCanSubscribe(java.lang.String event_type_name)
                                                    throws BrokerException
Get the list of client groups which can subscribe the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.

Throws:
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

getClientGroupsWhichCanLogPublish

public java.lang.String[] getClientGroupsWhichCanLogPublish(java.lang.String event_type_name)
                                                     throws BrokerException
Get the list of client groups which can log publish of the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.

Throws:
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

getClientGroupsWhichCanLogAcknowledge

public java.lang.String[] getClientGroupsWhichCanLogAcknowledge(java.lang.String event_type_name)
                                                         throws BrokerException
Get the list of client groups which can log acknowledgement of the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.

Throws:
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

getClientGroupInfo

public BrokerClientGroupInfo getClientGroupInfo(java.lang.String client_group_name)
                                         throws BrokerException
Get the specified client group's information.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the specified client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

getClientGroupInfos

public BrokerClientGroupInfo[] getClientGroupInfos(java.lang.String[] client_group_names)
                                            throws BrokerException
Get the client group information for the requested client groups. If client_group_names is null, gets the client group info for all client groups. Only returns client groups which this client can browse. Clients can always browse their own client group. The returned array is the same size as the client_group_names array. Entries will be returned as null if they cannot be browsed because of permission failure or because the client group does not exist.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNullParameterException - If an entry in client_group_names is null.
BrokerException

setClientGroupRequiredEncryption

public void setClientGroupRequiredEncryption(java.lang.String client_group_name,
                                             int level)
                                      throws BrokerException
Set the required encryption for a client group. The level can be one of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. This client group's current value can be acquired using getClientGroupInfo().

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerOutOfRangeException - If level is not a valid value.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupAccessLabelRequired

public void setClientGroupAccessLabelRequired(java.lang.String client_group_name,
                                              boolean required)
                                       throws BrokerException
Set whether or not an access label is required for connecting to a client group. This client group's current value can be acquired using getClientGroupInfo().

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupDescription

public void setClientGroupDescription(java.lang.String client_group_name,
                                      java.lang.String description)
                               throws BrokerException
Set the description string for a client group. This value can be acquired using getClientGroupInfo().

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name or description are null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

getClientGroupCanPublishList

public java.lang.String[] getClientGroupCanPublishList(java.lang.String client_group_name)
                                                throws BrokerException
Get the list of event types the client group can publish or deliver.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupCanPublishList

public void setClientGroupCanPublishList(java.lang.String client_group_name,
                                         java.lang.String[] event_type_names)
                                  throws BrokerException
Set the list of event types the client group can publish to deliver.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name or event_type_names is null, or if any entry in the array is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerUnknownEventTypeException - If an event type is listed that does not exist in the broker. In this case, the can publish list is not altered.
BrokerException

getClientGroupCanSubscribeList

public java.lang.String[] getClientGroupCanSubscribeList(java.lang.String client_group_name)
                                                  throws BrokerException
Get the list of event types the client group can subscribe to or have delivered to it.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupCanSubscribeList

public void setClientGroupCanSubscribeList(java.lang.String client_group_name,
                                           java.lang.String[] event_type_names)
                                    throws BrokerException
Set the list of event types the client group can subscribe to or have delivered to it.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name or event_type_names is null, or if any entry in the array is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerUnknownEventTypeException - If an event type is listed that does not exist in the broker. In this case, the can subscribe list is not altered.
BrokerException

getClientGroupStats

public BrokerEvent getClientGroupStats(java.lang.String client_group_name)
                                throws BrokerException
Get the specified client group's statistics. The statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

getClientGroupACL

public BrokerAccessControlList getClientGroupACL(java.lang.String client_group_name)
                                          throws BrokerException
Get the specified client group's access control list (ACL).

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to access security on the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupACL

public void setClientGroupACL(java.lang.String client_group_name,
                              BrokerAccessControlList acl)
                       throws BrokerException
Set the specified client group's access control list (ACL).

Throws:
BrokerInvalidAccessListException - If the access list is not valid.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to access security on the client group.
BrokerNullParameterException - If client_group_name or acl are null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

getClientIds

public java.lang.String[] getClientIds()
                                throws BrokerException
Get the IDs of all the clients in the Broker. Only returns the IDs of clients which this client can browse. Clients can always browse their own client.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerException

getClientIdsByClientGroup

public java.lang.String[] getClientIdsByClientGroup(java.lang.String client_group_name)
                                             throws BrokerException
Get the IDs of all the clients in the Broker which are members of the specified client group.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse clients in the specified client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

getClientIdsWhichAreSubscribed

public java.lang.String[] getClientIdsWhichAreSubscribed(java.lang.String event_type_name)
                                                  throws BrokerException
Get the IDs of all the clients in the Broker which are subscribed to the specified event type. Only returns the IDs of clients which this client can browse. Clients can always browse their own client.

Throws:
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

createClient

public void createClient(java.lang.String client_id,
                         java.lang.String client_group,
                         java.lang.String app_name,
                         java.lang.String user_name,
                         java.lang.String authenticator_name,
                         BrokerConnectionDescriptor desc)
                  throws BrokerException
Create a new client on the broker. Since this does not open a connection to the broker for that client, this only works for clients in client groups with explicit destroy life cycle. To create a client with an owner, pass values in for user_name and authenticator_name. If either one is null, then the client will be created without an owner. The only aspects of the BrokerConnectionDescriptor which is looked at are the shared state setting and the access label hint.

Throws:
BrokerClientExistsException - If a client using the specified client ID already exists.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidClientIdException - If the ID contains illegal characters.
BrokerInvalidNameException - If the app_name contains illegal characters.
BrokerNoPermissionException - If the client does not have permission to modify clients in the specified client group.
BrokerNullParameterException - If client_id, client_group or app_name are null.
BrokerUnknownClientGroupException - If the specified client group does not exist on the broker.
BrokerException

destroyClientById

public void destroyClientById(java.lang.String client_id)
                       throws BrokerException
Destroy the specified client.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the specified client.
BrokerNullParameterException - If client_id is null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

disconnectClientById

public void disconnectClientById(java.lang.String client_id)
                          throws BrokerException
Disconnect all sessions for the specified client.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the specified client.
BrokerNullParameterException - If client_id is null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

disconnectClientSessionById

public void disconnectClientSessionById(java.lang.String client_id,
                                        int session_id)
                                 throws BrokerException
Disconnect the specified session for the specified client.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the specified client.
BrokerNullParameterException - If client_id is null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerUnknownSessionIdException - If the specified client session does not exist on the broker.
BrokerException

getClientInfoById

public BrokerClientInfo getClientInfoById(java.lang.String client_id)
                                   throws BrokerException
Get the specified client's information.

Throws:
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

getClientInfosById

public BrokerClientInfo[] getClientInfosById(java.lang.String[] client_ids)
                                      throws BrokerException
Get the client information for the requested clients. If client_ids is null, gets the client info for all clients. Only returns information on clients which this client can browse. Clients can always browse their own client. The returned array is the same size as the client_ids array. Entries will be returned as null if they cannot be read because lack of permission to browse the client or because the client does not exist.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNullParameterException - If an entry in client_ids is null.
BrokerException

getClientInfosetById

public BrokerEvent getClientInfosetById(java.lang.String client_id)
                                 throws BrokerException
Get the infoset for this client. The infoset is returned as an event object for convenience. In addition to the listed exceptions, any communications exception can be thrown.

Throws:
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

setClientInfosetById

public void setClientInfosetById(java.lang.String client_id,
                                 BrokerEvent infoset)
                          throws BrokerException
Set the infoset for a client. The infoset is passed as an event for convenience. In addition to the listed exceptions, any communications exception can be thrown.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidEventTypeNameException - If the event type name contains colons, which makes it an invalid infoset name.
BrokerNoPermissionException - If the client does not have permission to modify the specified client.
BrokerNullParameterException - If client_id or infoset are null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

getClientSubscriptionsById

public BrokerSubscription[] getClientSubscriptionsById(java.lang.String client_id)
                                                throws BrokerException
Get the list of open subscriptions for a client.

Throws:
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

doesClientSubscriptionExistById

public boolean doesClientSubscriptionExistById(java.lang.String client_id,
                                               java.lang.String event_type_name,
                                               java.lang.String filter)
                                        throws BrokerException
Test if a subscription exists on the client with the given event type name and filter. The filter can be null.

Throws:
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 or event_type_name are null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

createClientSubscriptionById

public void createClientSubscriptionById(java.lang.String client_id,
                                         BrokerSubscription sub)
                                  throws BrokerException
Create a subscription for the client to all events of a given event type which match the specified filter. 'sub.filter' can be null if you do not want to filter the events. If a subscription with the same name and filter already exists on the broker, the create subscription request is ignored. You can use doesSubscriptionExistById() to test for existing subscriptions.

Throws:
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 modify the the specified client, or if the client does not have permission to subscribe to the event type.
BrokerNullParameterException - If client_id, sub, or sub.event_type_name are null.
BrokerOutOfRangeException - If sub.sub_id is less than zero.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

createClientSubscriptionsById

public void createClientSubscriptionsById(java.lang.String client_id,
                                          BrokerSubscription[] subs)
                                   throws BrokerException
Open multiple subscriptions for a client at one time. If a subscription with the same name and filter already exists on the broker, the create subscription request is ignored. You can use doesSubscriptionExistById() to test for existing subscriptions.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException - If the filter string contains a parse error. All other subscriptions are created if this error occurs.
BrokerNoPermissionException - If the client does not have permission to modify the specified client , or if the client does not have permission to subscribe to all the event types.
BrokerNullParameterException - If client_id or subs are null, or if any element in the array is null, or if any element's event_type_name is null.
BrokerOutOfRangeException - If any element's sub_id is less than zero.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerUnknownEventTypeException - If the event type does not exist on the broker. All other subscriptions are created if this error occurs.
BrokerException

destroyClientSubscriptionById

public void destroyClientSubscriptionById(java.lang.String client_id,
                                          BrokerSubscription sub)
                                   throws BrokerException
Cancel a subscription for a client with matching event type and filter. The 'filter' field may be null. The 'sub_id' field of the subscription is ignored. Only the event type name and filter are used to match the subscription.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException - If there is no existing subscription that matches.
BrokerNoPermissionException - If the client does not have permission to modify the specified client.
BrokerNullParameterException - If client_id, sub, or sub.event_type_name are null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

destroyClientSubscriptionsById

public void destroyClientSubscriptionsById(java.lang.String client_id,
                                           BrokerSubscription[] subs)
                                    throws BrokerException
Cancel multiple subscriptions for a client with matching event types and filters. The 'sub_id' field of the subscription is ignored. Only the event type name and filter are used to match the subscription.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidSubscriptionException - If there is no existing subscription that matches one or more of the subscriptions. If this error occurs, the other subscriptions are still destroyed.
BrokerNoPermissionException - If the client does not have permission to modify the specified client.
BrokerNullParameterException - If client_id or subs are null, or if any element in the array is null, or if any element's event_type_name is null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

setClientStateShareLimitById

public void setClientStateShareLimitById(java.lang.String client_id,
                                         int limit)
                                  throws BrokerException
Set a client's state share limit. This is the number of clients which can be simultaneously connected using the client ID. Only usable on shared state clients. A value of BrokerClient.NO_SHARE_LIMIT (-1) means there is no limit. The current value can be acquiring using getClientInfoById().

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the specified client, or if the client is not a shared state client.
BrokerNullParameterException - If client_id is null.
BrokerOutOfRangeException - If limit is zero or less than -1.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

setClientLastPublishSequenceNumberById

public void setClientLastPublishSequenceNumberById(java.lang.String client_id,
                                                   long seqn)
                                            throws BrokerException
Set a client's high publisher sequence number. This is the sequnece i number of the most recently published event by the client, and is used to by the broker to discard duplicate events. The current value can be acquiring using getClientInfoById().

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the specified client, or if the client is not a shared state client.
BrokerNullParameterException - If client_id is null.
BrokerOutOfRangeException - If seqn is less than 0.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

clearClientQueueById

public void clearClientQueueById(java.lang.String client_id)
                          throws BrokerException
Clear all events from the client's queue. Use with caution.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to access events for the specified client.
BrokerNullParameterException - If client_id is null.
BrokerUnknownClientIdException - If the client does not exist on the broker.
BrokerException

getClientStatsById

public BrokerEvent getClientStatsById(java.lang.String client_id)
                               throws BrokerException
Get a client's statistics. The statistics are set into a BrokerEvent as fields. The available values are:

Throws:
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

getClientStatsByIds

public BrokerEvent[] getClientStatsByIds(java.lang.String[] client_ids)
                                  throws BrokerException
Get statistics for the list of client IDs. The return value is array of BrokerEvent objects The statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the specified client.
BrokerException

getAllQueueStats

public BrokerAllQueueStat[] getAllQueueStats()
                                      throws BrokerException
Get All client's statistics. The statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the specified client.
BrokerIncompatibleVersionException - Broker Server does not support this operation.
BrokerException

destroyEventType

public void destroyEventType(java.lang.String event_type_name,
                             boolean force_destroy)
                      throws BrokerException
Destroy the named event type. If the force_destroy flag is true, then any client subscriptions using the event type are also destroyed, as are any can publish and can subscribe entries in client groups. If the flag is false, then an error is returned if any subscriptions exist which use the event type, or if any client group can publish or subscribe to the event type. Use getClientIdsWhichAreSubscribed(), getClientGroupsWhichCanPublish(), and getClientGroupsWhichCanSubscribe() to get the list of dependencies.

Throws:
BrokerDependencyException - If force_destroy is false and there are clients which have subscriptions to the event type, or client groups which have can publish or can subscribe permission to the event type.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the event type.
BrokerNullParameterException - If event_type_name is null.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

destroyEventTypes

public void destroyEventTypes(java.lang.String[] event_type_names,
                              boolean force_destroy)
                       throws BrokerException
Destroy the named event types. If the force_destroy flag is true, then any client subscriptions using the event types are also destroyed, as are any can publish and can subscribe entries in client groups. If the flag is false, then an error is returned if any subscriptions exist which use the event types, or if any client group can publish or subscribe to the event type. Use getClientIdsWhichAreSubscribed(), getClientGroupsWhichCanPublish(), and getClientGroupsWhichCanSubscribe() to get the list of dependencies. No error is returned if any of the listed event types do not exist.

Throws:
BrokerDependencyException - If force_destroy is false and there are clients which have subscriptions to the one or more of the event types, or client groups which have can publish or can subscribe permission to the event type. No events will be destroyed if this occurs.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify one or more of the event types. All the other event types are still destroyed.
BrokerNullParameterException - If event_type_names is null, or any entry in the array is null.
BrokerException

getEventAdminTypeDef

public BrokerAdminTypeDef getEventAdminTypeDef(java.lang.String event_type_name)
                                        throws BrokerException
Get the specified event type's definition.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the event type. Note that all clients can browse event types which they can publish or subscribe to.
BrokerNullParameterException - If event_type_name is null.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

getEventAdminTypeDefs

public BrokerAdminTypeDef[] getEventAdminTypeDefs(java.lang.String[] event_type_names)
                                           throws BrokerException
Get the definitions for the requested event types. If event_type_names is null, gets definitions for all event types. Only returns the event types which this client can browse. Clients can always browse the event types which they can publish or subscribe to. The returned array is the same size as the event_type_names array. Entries will be returned as null if they cannot be read because of permission failure or because the event type does not exist.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNullParameterException - If event_type_names is not null, but at least one entry in the array is null.
BrokerException

getEventAdminTypeDefsByScope

public BrokerAdminTypeDef[] getEventAdminTypeDefsByScope(java.lang.String scope_name)
                                                  throws BrokerException
Get the definitions for the event types within the named scope. Only returns the event types which this client can browse. Clients can always browse the event types which they can publish or subscribe to.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNullParameterException - If scope_name is null.
BrokerUnknownEventTypeException - If no events exist in the specified scope on the broker.
BrokerException

setEventAdminTypeDef

public void setEventAdminTypeDef(BrokerAdminTypeDef type_def)
                          throws BrokerException
Set the specified event type's definition. If the type does not exist, this creates the event type.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the event type, or when creating an event type the permission to modify any event type.
BrokerNullParameterException - If type_def is null.
BrokerException

setEventAdminTypeDefs

public void setEventAdminTypeDefs(BrokerAdminTypeDef[] type_defs)
                           throws BrokerException
Set the specified event type definitions. If the types do not exist, this creates the event types.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the event types, or when creating an event type the permission to modify any event type.
BrokerNullParameterException - If type_defs is null, or if any entry in the array is null.
BrokerException

getEventTypeStats

public BrokerEvent getEventTypeStats(java.lang.String event_type_name)
                              throws BrokerException
Get statistics for an event type. Statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the event type.
BrokerNullParameterException - If event_type_name is null.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

setEventTypeInfoset

public void setEventTypeInfoset(java.lang.String event_type_name,
                                java.lang.String infoset_name,
                                BrokerEvent infoset)
                         throws BrokerException
Set the specified infoset for an event type. The infoset is passed as an event for convenience. If infoset_name is null, the type name of the infoset event is used as the infoset name. Creates the infoset if it did not exist before.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidEventTypeNameException - If the infoset name is not valid.
BrokerNoPermissionException - If the client does not have permission to modify the event type.
BrokerNullParameterException - If event_type_name or infoset are null.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

setEventTypeInfosets

public void setEventTypeInfosets(java.lang.String event_type_name,
                                 BrokerEvent[] infosets)
                          throws BrokerException
Set the specified infosets for the specified event type. The infosets are passed as events for convenience. The type name of the infoset events are used as the infoset names. Creates the infosets if they did not exist before.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidEventTypeNameException - If any of the infoset names are not valid.
BrokerNoPermissionException - If the client does not have permission to modify the event type.
BrokerNullParameterException - If event_type_name or infoset are null, or if any entry in the array is null.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

destroyEventTypeInfoset

public void destroyEventTypeInfoset(java.lang.String event_type_name,
                                    java.lang.String infoset_name)
                             throws BrokerException
Destroy the specified infoset for the specified event type.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify 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 broker.
BrokerException

destroyEventTypeInfosets

public void destroyEventTypeInfosets(java.lang.String event_type_name,
                                     java.lang.String[] infoset_names)
                              throws BrokerException
Destroy the specified infosets for the specified event type. If infoset_names is null, then all infosets on the event type are destroyed. No error is issued if an attempt is made to destroy infosets that do not exist.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the event type.
BrokerNullParameterException - If event_type_name is null, or if any entry in the array is null.
BrokerUnknownEventTypeException - If the event type does not exist on the broker.
BrokerException

setEventTypesAndClientGroups

public BrokerSetFailureInfo setEventTypesAndClientGroups(java.lang.String[] event_type_names_to_destroy,
                                                         java.lang.String[] client_group_names_to_destroy,
                                                         BrokerCompleteEventType[] event_types,
                                                         BrokerCompleteClientGroup[] client_groups,
                                                         boolean forced)
                                                  throws BrokerException
Creates, modifies, and destroys event types and client groups as an atomic operation. All deletions take place first, then all the other values are modified (or created if they did not exist). Any parameter can be null to ignore that aspect of the operation. For example, if client_group_names_to_destroy is null, then no client groups will be destroyed. And if a client group entry has its acl field set to null, the access control list will not be updated. If the infosets portion of an event type is non-null, then the replace_all_infosets flag in the BrokerCompleteEventType class is used to determine if the infosets are merged in or if they completely replace the existing infosets. To delete infosets using this method, you must get the existing infosets, remove the ones you want to delete, and then set the replace_all_infosets flag to true. The return value is null if all operations completed successfully, and is an object describing what could not be completed if the operations were not completed successfully. If the 'force' option is false, then nothing is done in the broker if any aspect of the set operation fails. The return value will be an object describing what could not be done. If there are any permission problems, then only permission problems are reported. If there are no permission problems, then only dependency failures are reported. If the 'force' option is true, then as much work as possible is completed. Any permission errors still causes it to fail, but if there are only dependencies, they are forced.

Throws:
BrokerInvalidAccessListException - If the access list is not valid.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidClientGroupNameException - If an invalid client group name is specified to be created.
BrokerInvalidEventTypeNameException - If an invalid event type name is specified to be created.
BrokerNullParameterException - If any array is non-null but one or more elements in it is null, or if any BrokerCompleteEventType's type_def field is null, or if any BrokerCompleteClientGroup's client_group_info field is null, of if any client_group_info's name is null.
BrokerOutOfRangeException - If any BrokerCompleteClientGroup's client_group_info field has an invalid life_cycle or storage_type value.
BrokerUnknownEventTypeException - If an unknown event type is specified in a can publish or can subscribe list.
BrokerException

destroyBroker

public void destroyBroker()
                   throws BrokerException
Destroy this Broker. Also results in destroying this client.

Throws:
BrokerInTerritoryException - If the broker is in a territory with at least one other broker. It must leave the territory before being destroyed.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client does not have permission to destroy the broker.
BrokerException

getBrokerStats

public BrokerEvent getBrokerStats()
                           throws BrokerException
Get the Broker statistics. Statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the Broker.
BrokerException

getBrokerDescription

public java.lang.String getBrokerDescription()
                                      throws BrokerException
Get the broker description

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerException

setBrokerDescription

public void setBrokerDescription(java.lang.String description)
                          throws BrokerException
Set the broker description

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNullParameterException - If description is null.
BrokerException

acquireChangeLock

public BrokerChangeLockInfo acquireChangeLock()
                                       throws BrokerException
Acquire the per-Broker change lock. If the lock is acquired, a BrokerChangeLockInfo object is returned with its "acquired" member set to true. If the lock is already held by a different client, the "acquired" member is set to false, and the client ID, session ID and the time of locking is returned in the BrokerChangeLockInfo object. Does not require any permissions. It is safe to call this method again after having acquired the lock.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerIncompatibleVersionException - If the broker does not support changelocks.
BrokerException

releaseChangeLock

public void releaseChangeLock()
                       throws BrokerException
Release the per-Broker change lock. An exception is returned if this client does not currently hold the change lock. Does not require any permissions.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerIncompatibleVersionException - If the broker does not support changelocks.
BrokerBadStateException - If the change lock is not currently held or held by another client.
BrokerException

getBrokersInTerritory

public BrokerInfo[] getBrokersInTerritory()
                                   throws BrokerException
Get the list of brokers in the territory, including this broker. This broker is always first in the list.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not part of a territory.
BrokerException

getTerritoryStats

public BrokerEvent getTerritoryStats()
                              throws BrokerException
Get the territory statistics. Statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not part of a territory.
BrokerException

createTerritory

public void createTerritory(java.lang.String territory_name)
                     throws BrokerException
Create a new territory with this broker as the first member. No warning will be issued if a territory already exists which has the same name.

Throws:
BrokerInTerritoryException - If the broker is already a member of a territory.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTerritoryNameException - If the territory name is not valid.
BrokerNoPermissionException - If the client does not have permission to modify the broker, or if the broker is not licensed for broker interconnection.
BrokerNullParameterException - If territory_name is null.
BrokerException

joinTerritory

public BrokerJoinFailureInfo joinTerritory(java.lang.String broker_host,
                                           java.lang.String broker_name)
                                    throws BrokerException
Have this broker join the territory of the specified other broker. May not pass in null for the broker name. Returns null on success. If there is a conflict of event types and/or client groups during the join, then you will get back an object listing the items that conflict.

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInTerritoryException - If the broker is already a member of a territory.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker, or if the broker is not licensed for broker interconnection.
BrokerNotInTerritoryException - If the other broker is not a member of a territory.
BrokerNullParameterException - If broker_host or broker_name are null.
BrokerOutOfRangeException - If there is another broker in the specified territory with the same name as this broker.
BrokerSecurityException - If the territory requires SSL and the joining broker does not support SSL.
BrokerUnknownBrokerNameException - If the specified broker does not exist.
BrokerSSLTerritoryException - If an error occurs during the SSL connection between the broker servers.
BrokerException

leaveTerritory

public void leaveTerritory(int msecs,
                           boolean forced)
                    throws BrokerException
Make this broker leave its current territory. This operation may take a while to complete because it requires talking to other brokers. Set msecs to BrokerClient.TIME_INFINITE (-1) if you want this operation to block until the leave operation is completed. If set to a shorter time, a timeout exception may be thrown before the operation is completed. Note that even if the timeout happens, any other operation on the broker made while the leave operation is in progress may also block and time out. If forced is true, then the broker will leave the territory even if it cannot contact other members of the territory to let them know within the broker's timeout period.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerException

removeBrokerFromTerritory

public void removeBrokerFromTerritory(java.lang.String broker_host,
                                      java.lang.String broker_name)
                               throws BrokerException
Force the removal of a given broker from the territory. This operation will return as soon as this broker has started the removal of the specified broker from the territory. It may return before other members of the territory are notified of this removal.

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If broker_host or broker_name are null.
BrokerOutOfRangeException - If attempt to remove the current broker.
BrokerUnknownBrokerNameException - If the specified broker on the specified host is not a member of the territory.
BrokerException

getTerritoryInfo

public BrokerTerritoryInfo getTerritoryInfo()
                                     throws BrokerException
Get the territory's settings.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerException

setTerritorySecurity

public void setTerritorySecurity(int auth_type,
                                 int encrypt_level)
                          throws BrokerException
Set the type of security used in the territory. The current settings can be acquired using getTerritoryInfo(). The auth_type value can be any of the AUTH_TYPE_* values. The encrypt_level value can be any of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. Changing this value on a territory can have major repercussions, so it should not be done lightly. It is recommended that all brokers in the territory be checked to make sure they are properly configured for the new mode prior to changing the mode. The change may take some time to propagate among the brokers. WARNING: May cause your territory to become partially disconnected if any member brokers are not properly configured for this connection type. For example, requring SSL authentication or encryption when one or more brokers are not even configured for SSL.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerOutOfRangeException - If auth_type or encrypt_level are not valid values.
BrokerException

getTerritoryACL

public BrokerAccessControlList getTerritoryACL()
                                        throws BrokerException
Get the access control list (ACL) which brokers in the territory are using to accept connections from other brokers in their territory.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerException

setTerritoryACL

public void setTerritoryACL(BrokerAccessControlList acl)
                     throws BrokerException
Set the access control list (ACL) which brokers in this territory will use to accept connections from other brokers in the territory. Changing the ACL will not cause existing inter-broker connections to fail. WARNING: May cause your territory to become partially disconnected if you disallow the user identity which a territory member is using to connect.

Throws:
BrokerInvalidAccessListException - If the access list is not valid.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If acl is null.
BrokerException

createTerritoryGateway

public void createTerritoryGateway(java.lang.String territory_name,
                                   java.lang.String broker_host,
                                   java.lang.String broker_name)
                            throws BrokerException
Create a gateway to the specified territory by having the current broker communicate with the broker specified by broker_host and broker_name. Note that this only creates one half of the gateway. A similar call must be made on the other broker to complete the gateway. Until that is done, the gateway will be in an incomplete status.

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNotRunningException - If the host is found, but no server is running on that host.
BrokerNullParameterException - If territory_name, broker_host, or broker_name are null.
BrokerOutOfRangeException - If this territory is already connected to the named territory through some other gateway.
BrokerUnknownBrokerNameException - If the specified broker does not exist.
BrokerUnknownTerritoryException - If the specified broker is not a member of the specified territory.
BrokerException

destroyTerritoryGateway

public void destroyTerritoryGateway(java.lang.String territory_name)
                             throws BrokerException
Destroy a gateway to the specified territory. Note that this only destroys one half of the gateway. A similar call must be made on the other broker to completely remove gateway. Until that is done, the gateway on the other broker will be in an incomplete status.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

getLocalTerritoryGateways

public BrokerTerritoryGatewayInfo[] getLocalTerritoryGateways()
                                                       throws BrokerException
Get the list of territories this broker is a gateway for.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerException

getAllTerritoryGateways

public BrokerTerritoryGatewayInfo[] getAllTerritoryGateways()
                                                     throws BrokerException
Get the list of territories accessible from this broker either through local gateways or gateways from other brokers.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerException

setTerritoryGatewaySecurity

public void setTerritoryGatewaySecurity(java.lang.String territory_name,
                                        int auth_type,
                                        int encrypt_level)
                                 throws BrokerException
Set the type of security used for the territory gateway. The current settings can be acquired using getLocalTerritoryGateways() or getAllTerritoryGateways(). The auth_type value can be any of the AUTH_TYPE_* values. The encrypt_level value can be any of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. Changing this value on a gateway can have major repercussions, so it should not be done lightly. It is recommended that the other broker be checked to make sure it is properly configured for the new mode prior to changing the mode. The change may take some time to take effect. WARNING: May cause your territory gateway to become disconnected if the other brokers is not properly configured for this connection type. For example, requring SSL authentication or encryption when the other broker is not configured for SSL.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerOutOfRangeException - If auth_type or encrypt_level are not valid values.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

getTerritoryGatewayACL

public BrokerAccessControlList getTerritoryGatewayACL(java.lang.String territory_name)
                                               throws BrokerException
Get the access control list (ACL) which this broker is using to accept connections from the other broker across the gateway. The ACL will either have zero entries if no checking is done, and one entry if checking is enabled.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

setTerritoryGatewayACL

public void setTerritoryGatewayACL(java.lang.String territory_name,
                                   BrokerAccessControlList acl)
                            throws BrokerException
Set the access control list (ACL) which this broker will use to accept connections from the other broker across the gateway. Note that the ACL can only contain one entry (or no entries) in each of the user and authenticator lists. Changing the ACL will not cause an existing gateway connection to fail. WARNING: May cause your gateway to become disconnected if you disallow the user identity which the other broker is using to connect.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name or acl are null.
BrokerOutOfRangeException - If the acl has more than one user entry or more than one auth entry in it.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerInvalidAccessListException - The DN access list contained invalid values.
BrokerException

getTerritoryGatewayRefuseAllUpdates

public boolean getTerritoryGatewayRefuseAllUpdates(java.lang.String territory_name)
                                            throws BrokerException
Returns whether a territory gateway refuses all updates.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

setTerritoryGatewayRefuseAllUpdates

public void setTerritoryGatewayRefuseAllUpdates(java.lang.String territory_name,
                                                boolean refuse_updates)
                                         throws BrokerException
Sets whether a territory gateway refuses all updates.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

getTerritoryGatewayRefuseEventTypeUpdates

public BrokerSharedEventTypeRefuseUpdateInfo[] getTerritoryGatewayRefuseEventTypeUpdates(java.lang.String territory_name)
                                                                                  throws BrokerException
Returns which event types a territory gateway refuses updates for.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

setTerritoryGatewayRefuseEventTypeUpdates

public void setTerritoryGatewayRefuseEventTypeUpdates(java.lang.String territory_name,
                                                      BrokerSharedEventTypeRefuseUpdateInfo[] infos)
                                               throws BrokerException
Sets which event types a territory gateway refuses updates for. The "refuse_events" field is ignored.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

getTerritoryGatewaySharedEventTypes

public BrokerSharedEventTypeInfo[] getTerritoryGatewaySharedEventTypes(java.lang.String territory_name)
                                                                throws BrokerException
Get the information on event types shared across a territory gateway.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

setClusterGatewaySharedEventTypes

public void setClusterGatewaySharedEventTypes(java.lang.String cluster_name,
                                              java.lang.String broker_name,
                                              BrokerSharedEventTypeInfo[] infos)
                                       throws BrokerException
Set the complete list of shared event types on a cluster gateway. The "is_synchronized" field is ignored.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTypeDefException - If one or more of the event types is not compatible with the type definition on the remote broker.
BrokerOutOfRangeException - If an event type does not have accept_subscribe permission, but has a non-empty subscription_filter.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerInvalidSubscriptionException - If a filter string contains a parse error.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNotRunningException - If the gateway connection is not open at this time, so changes cannot be accepted.
BrokerNullParameterException - If cluster_name, broker_name or infos are null, or if any element in the infos array is null, or if any element of the infos array has an event_type_name set to null.
BrokerUnknownEventTypeException - If one or more event types are specified that do not exist on either of the two brokers. The type must already exist on both brokers to be shared. If this error occurs, no changes are applied.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerIncompatibleVersionException - The Broker does not support setting subscription filters for cluster gateways.
BrokerException

setTerritoryGatewaySharedEventTypes

public void setTerritoryGatewaySharedEventTypes(java.lang.String territory_name,
                                                BrokerSharedEventTypeInfo[] infos)
                                         throws BrokerException
Set the complete list of shared event types on a territory gateway. The "is_synchronized" field is ignored.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTypeDefException - If one or more of the event types is not compatible with the type definition on the remote broker.
BrokerOutOfRangeException - If an event type does not have accept_subscribe permission, but has a non-empty subscription_filter.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerInvalidSubscriptionException - If a filter string contains a parse error.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNotRunningException - If the gateway connection is not open at this time, so changes cannot be accepted.
BrokerNullParameterException - If territory_name or infos are null, or if any element in the infos array is null, or if any element of the infos array has an event_type_name set to null.
BrokerUnknownEventTypeException - If one or more event types are specified that do not exist on either of the two brokers. The type must already exist on both brokers to be shared. If this error occurs, no changes are applied.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

getTerritoryGatewayStats

public BrokerEvent getTerritoryGatewayStats(java.lang.String territory_name)
                                     throws BrokerException
Get the territory gateway statistics. Statistics are set into a BrokerEvent as fields. The available values are:

Parameters:
territory_name - The name of the remote territory that identifies the gateway to which the Broker connects to.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerNullParameterException - If territory_name is null.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerException

getActivityTraces

public BrokerTraceEvent[] getActivityTraces(int seqn,
                                            int msecs)
                                     throws BrokerException
Get an array of broker activity traces. 'seqn' is zero on the first call and should be the value of 1 greater than the sequence number on the last element returned for future calls. Blocks for a given number of milliseconds then gives up. If 'msecs' is BrokerClient.TIME_INFINITE (-1), it waits forever. Note that if traces are not picked up regularly or if the broker is exceptionally busy, that some may be missed. Note that when using the automatic reconnect feature, you should reset your expected sequence number to zero again each time you are reconnected to the broker.

Throws:
BrokerInterruptedException - If this operation is interrupted.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to access diagnostics on the broker.
BrokerTimeoutException - If no traces arrive before the specified number of milliseconds pass.
BrokerException

getClientGroupLogPublishList

public java.lang.String[] getClientGroupLogPublishList(java.lang.String client_group_name)
                                                throws BrokerException
Get the list of event types that are logged when published or delivered by a client in the the specified client group.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupLogPublishList

public void setClientGroupLogPublishList(java.lang.String client_group_name,
                                         java.lang.String[] event_type_names)
                                  throws BrokerException
Set the list of event types that are logged when published or delivered by a client in the the specified client group.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name or event_type_names is null, or if any entry in the array is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerUnknownEventTypeException - If an event type is listed that does not exist in the broker. In this case, the can publish list is not altered.
BrokerException

getClientGroupLogAcknowledgeList

public java.lang.String[] getClientGroupLogAcknowledgeList(java.lang.String client_group_name)
                                                    throws BrokerException
Get the list of event types that are logged when they are acknowledged by a client in the the specified client group.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the client group.
BrokerNullParameterException - If client_group_name is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerException

setClientGroupLogAcknowledgeList

public void setClientGroupLogAcknowledgeList(java.lang.String client_group_name,
                                             java.lang.String[] event_type_names)
                                      throws BrokerException
Set the list of event types that are logged when acknowledged by a client in the the specified client group.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the client group.
BrokerNullParameterException - If client_group_name or event_type_names is null, or if any entry in the array is null.
BrokerUnknownClientGroupException - If the client group does not exist on the broker.
BrokerUnknownEventTypeException - If an event type is listed that does not exist in the broker. In this case, the can publish list is not altered.
BrokerException

getLogEvents

public BrokerEvent[] getLogEvents(int from_index,
                                  int max_events,
                                  int msecs)
                           throws BrokerException
Gets one or more events from the brokers event log at the given zero-based index. The number of events being returned is not guaranteed to be 'max_events' even if there are more than max_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. Throws an exception with the following major code setting: INVALID_CLIENT if the client is not valid. In addition, any of the communications errors can occur.

Parameters:
from_index - - return events starting from this zero-based index
max_events - - maximum number of events from the given index
msecs - - maximum amount of time that the events are peeked for in the queue.
Throws:
BrokerInvalidClientException - - the admin client not connected
BrokerOutOfRangeException - - from_index < 0
BrokerNullParameterException - - max_events, msecs = 0
BrokerNullParameterException - - if there are no logged events
BrokerTimeoutException - - reply from Broker is null
BrokerException

deleteLogEvents

public int deleteLogEvents(int from_index,
                           int num_events)
                    throws BrokerException
Deletes one or more events from the broker's log. The number of events being deleted is not guaranteed to be 'num_events' Returns the number of events deleted

Parameters:
from_index - - events to be deleted starting from this index
num_events - - number of events to be deleted
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if num_events are NULL.
BrokerOutOfRangeException - if index is < 0 In addition, any of the communications errors can occur.
BrokerException

getLogLength

public int getLogLength()
                 throws BrokerException
Returns the number of events in the broker's log.

Throws:
BrokerInvalidClientException - if the client is not valid. In addition, any of the communications errors can occur.
BrokerException

setLogFilter

protected void setLogFilter(java.lang.String event_name,
                            java.lang.String filter_expr)
                     throws BrokerException
Allows filtering of log content. If a filter is set on the broker's log then only those events that match the filter will be processed by log operations such as getLogEvent and deleteLogEvent This method can be called repeatedly with different event types to create a filter list. Each event type can have at most one filter. Passing in NULL values for both et_name and filter_expr will reset the filters on the log.

Parameters:
event_name - - event name on which the filter should be set
filter_expr - - filter string to be set
Throws:
BrokerFailureException
BrokerInvalidEventTypeNameException
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if events are NULL.
BrokerOutOfRageException - if index or lock_id is < 0 (or) if lock is invalid (or) if lock is held by other
BrokerException

setLogFilters

protected void setLogFilters(BrokerFilter[] filters)
                      throws BrokerException
Allows filtering of log content. If a filter is set on the broker's log then only those events that match the filter will be processed by log operations such as getLogEvent and deleteLogEvent Only one filter per event type is permitted.

Parameters:
filters - - array of BrokerFilters that need to be set on events in the queue that has been locked.
Throws:
BrokerFailureException
BrokerInvalidEventTypeNameException
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if events are NULL.
BrokerOutOfRageException - if index is < 0
BrokerException

setEventLogging

public void setEventLogging(boolean enabled)
                     throws BrokerException
Throws:
BrokerException

getEventLogging

public boolean getEventLogging()
                        throws BrokerException
Overrides:
getEventLogging in class BrokerClient
Throws:
BrokerException

setTerritoryGatewayKeepAlive

public void setTerritoryGatewayKeepAlive(java.lang.String territory_name,
                                         int KeepAlive)
                                  throws BrokerException
Sets or disables KeepAlive interval on the gateway.

Parameters:
territory_name - - name of the territory
KeepAlive - - interval in seconds to send keep alive messages. If zero, sending Keep Alive messages will be disabled
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if territory name is null
BrokerOutOfRangeException - if KeepALive is < 0
BrokerException

getTerritoryGatewayKeepAlive

public int getTerritoryGatewayKeepAlive(java.lang.String territory_name)
                                 throws BrokerException
Returns KeepAlive interval on the gateway. Zero return value indicates sending Keep Alive events is disabled

Parameters:
territory_name - - name of the territory
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if territory name is null
BrokerException

getStaticGatewayForwarding

public boolean getStaticGatewayForwarding(java.lang.String territory_name)
                                   throws BrokerException
Get current static gateway forwarding status.

Parameters:
territory_name - name of the remote territory
Returns:
Returns true if the static gateway subscription is set on the given remote territory from the current broker. Returns false, if not set.
Throws:
BrokerInvalidClientException - If the client is not valid.
BrokerNotInTerritoryException - If the broker is not part of a territory.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory.
BrokerNullParameterException - if territory name is null
BrokerException

setStaticGatewayForwarding

public void setStaticGatewayForwarding(java.lang.String territory_name,
                                       boolean enable)
                                throws BrokerException
Enable or disable static gateway forwarding,

Parameters:
territory_name - - name of the remote territory
enable - - state of the static gateway subscription to set (true - enable, false - disable)
Throws:
BrokerNotInTerritoryException - If the broker is not part of a territory.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory.
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if territory name is null
BrokerException

checkAndRestartForwarding

public int checkAndRestartForwarding(java.lang.String remote_broker_name)
                              throws BrokerException
Check for inactivity and restart forwarding documemnts across the specfied territory or gateway broker. Returns zero if the remote broker was restrted. otherwise returns a non-zero value.

Parameters:
remote_broker_name - - name of the remote broker
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if remote broker name is null
BrokerException

checkAndRestartForwarding

public int checkAndRestartForwarding()
                              throws BrokerException
Check for inactivity and restart forwarding documemnts on all territory and gateway brokers on this broker. Returns zero if no remote brokers was restrted. A non-zero return indicates the number of remote broker connections that were restarted.

Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if remote broker name is null
BrokerException

setTerritoryGatewayPause

public void setTerritoryGatewayPause(java.lang.String territory_name,
                                     boolean pause)
                              throws BrokerException
Pauses or resumes gateway

Parameters:
territory_name - - name of the territory
pause - - state of the gateway to set (true - paused, false - resumed)
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected..
BrokerNullParameterException - If territory_name is null
BrokerBadStateException - If territory gateway is already paused or resumed
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInTerritoryException - If the broker is not a member of a territory.
BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
BrokerIncompatibleVersionException - If the Broker version does not support this feature.
BrokerQueueBrowserException - The gateway forwarding queue is locked by a queue browser.
BrokerException

getPrePrepareTimeout

public int getPrePrepareTimeout()
                         throws BrokerException
Get the default pre-prepare timeout. This is the default timeout period between when a transaction is begun and before it is prepared.

Returns:
The default pre-prepare timeout in seconds.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException
See Also:
setPrePrepareTimeout(int)

setPrePrepareTimeout

public void setPrePrepareTimeout(int timeout_secs)
                          throws BrokerException
Set the default pre-prepare timeout. This is the default timeout period between when a transaction is begun and before it is prepared.

Parameters:
timeout_secs - The default pre-prepare timeout in seconds to set.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerOutOfRangeException - If the timeout value is invalid.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException
See Also:
getPrePrepareTimeout()

getPostPrepareTimeout

public int getPostPrepareTimeout()
                          throws BrokerException
Get the default post-prepare timeout. This is the default timeout period between when a transaction is prepared and before it is committed.

Returns:
The default post-prepare timeout in seconds.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException
See Also:
setPostPrepareTimeout(int), getPostPrepareTimeoutAction()

setPostPrepareTimeout

public void setPostPrepareTimeout(int timeout_secs)
                           throws BrokerException
Set the default post-prepare timeout. This is the default timeout period between when a transaction is prepared and before it is committed.

Parameters:
timeout_secs - The post-prepare timeout in seconds to set.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerOutOfRangeException - If the timeout value is invalid.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException
See Also:
getPostPrepareTimeout(), setPostPrepareTimeoutAction(int)

setPostPrepareTimeoutAction

public void setPostPrepareTimeoutAction(int action)
                                 throws BrokerException
Set the post-prepare timeout action. This is the action the Broker transaction manager will take when a prepared transaction times out.

Parameters:
action - Either BrokerAdminClient.TRANSACTION_ROLLBACK or BrokerAdminClient.TRANSACTION_COMMIT.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerOutOfRangeException - If the action is invalid.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException
See Also:
getPostPrepareTimeoutAction(), setPostPrepareTimeout(int)

getPostPrepareTimeoutAction

public int getPostPrepareTimeoutAction()
                                throws BrokerException
Get the post-prepare timeout action. This is the action the Broker transaction manager will take when a prepared transaction times out.

Returns:
The post-prepare timeout action.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException
See Also:
setPostPrepareTimeoutAction(int), getPostPrepareTimeout()

getTransactions

public BrokerEvent getTransactions()
                            throws BrokerException
Get the list of current transactions in the Broker transaction manager. The transaction information is stored in a Broker event as follows:
   transaction context info {
     date now;
     struct {
       long          transactionId;
       UnicodeString externalId;
       UnicodeString clientId;
       int           sessionId;
       int           state;
       date          createdTime;
       date          endedTime;
       date          preparedTime;
       date          closedTime;
       int           closedReason;
       date          unpreparedTimeout;
       int           preparedTimeoutInterval;
       date          preparedTimeout;
       int           numEventsReceived;
       int           numEventsAcknowledged;
       int           numEventsPublished;
     } transactions[];
   }
 

Returns:
A Broker event containing information on all of the current transactions.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

getTransactionsByClient

public BrokerEvent getTransactionsByClient(java.lang.String client_id)
                                    throws BrokerException
Get the list of a client's transactions in the Broker transaction manager. The transaction information is stored in a Broker event as follows:
   transaction context info {
     date now;
     struct {
       long          transactionId;
       UnicodeString externalId;
       UnicodeString clientId;
       int           sessionId;
       int           state;
       date          createdTime;
       date          endedTime;
       date          preparedTime;
       date          closedTime;
       int           closedReason;
       date          unpreparedTimeout;
       int           preparedTimeoutInterval;
       date          preparedTimeout;
       int           numEventsReceived;
       int           numEventsAcknowledged;
       int           numEventsPublished;
     } transactions[];
   }
 

Returns:
A Broker event containing information on all of the client's transactions.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidClientIdException - If the client_id contains illegal characters.
BrokerNullParameterException - If the client_id is null.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

getHeuristicTransactions

public BrokerEvent getHeuristicTransactions()
                                     throws BrokerException
Get the list of heuristic transactions in the Broker transaction manager. The transaction information is stored in a Broker event as follows:
   transaction context info {
     date now;
     struct {
       long          transactionId;
       UnicodeString externalId;
       UnicodeString clientId;
       int           sessionId;
       int           state;
       date          createdTime;
       date          endedTime;
       date          preparedTime;
       date          closedTime;
       int           closedReason;
       date          unpreparedTimeout;
       int           preparedTimeoutInterval;
       date          preparedTimeout;
       int           numEventsReceived;
       int           numEventsAcknowledged;
       int           numEventsPublished;
     } transactions[];
   }
 

Returns:
A Broker event containing information on all of the heuristic transactions.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

commitForced

public void commitForced(long tx_id)
                  throws BrokerException
Forcibly commit a transaction.

Parameters:
tx_id - The Broker transaction context to commit.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTxException - If the transaction does not exist or the transaction state does not allow it to be committed.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

commitForced

public void commitForced(long[] tx_ids)
                  throws BrokerException
Forcibly commit a list of transactions.

Parameters:
tx_ids - A list of Broker transaction contexts to commit.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTxException - If one or more transactions do not exist or the transaction state does not allow it to be committed.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

abortForced

public void abortForced(long tx_id)
                 throws BrokerException
Forcibly abort a transaction.

Parameters:
tx_id - The Broker transaction context to abort.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTxException - If the transaction does not exist or the transaction state does not allow it to be aborted.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

abortForced

public void abortForced(long[] tx_ids)
                 throws BrokerException
Forcibly abort a list of transactions.

Parameters:
tx_ids - A list of Broker transaction contexts to abort.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNullParameterException - If tx_ids is null.
BrokerInvalidTxException - If one or more transactions do not exist or the transaction state does not allow it to be aborted.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

forgetForced

public void forgetForced(long tx_id)
                  throws BrokerException
Forcibly purge a heuristic transaction.

Parameters:
tx_id - The Broker transaction context to purge.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidTxException - If the transaction does not exist.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

forgetForced

public void forgetForced(long[] tx_ids)
                  throws BrokerException
Forcibly purge a list of heuristic transactions.

Parameters:
tx_ids - A list of Broker transaction contexts to purge.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNullParameterException - If tx_ids is null.
BrokerInvalidTxException - If one or more transactions do not exist.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

forgetForced

public void forgetForced()
                  throws BrokerException
Forcibly purge all heuristic transactions.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerIncompatibleVersionException - If the broker does not support transaction administration.
BrokerException

setRecoverMode

public void setRecoverMode(int mode)
                    throws BrokerException
Sets the global recover mode to either restricted (the default) or global. Restricted mode only allows a client to recover transactions to which it participated. Global mode allows a client to recover all recoverable transactions.

Parameters:
mode - The recover mode to set, either RECOVER_GLOBAL or RECOVER_RESTRICTED.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerOutOfRangeException - If the recovery mode is invalid.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerException

getRecoverMode

public int getRecoverMode()
                   throws BrokerException
Gets the global recover mode.

Returns:
The recover mode.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have sufficient permissions.
BrokerException

transactionStateToString

public static java.lang.String transactionStateToString(int state)
Returns a String object representing the specified Broker Transaction Manager's transaction state.

Parameters:
state - The Broker Transaction Manager's transaction state to be converted.
Returns:
The string representation of the specified state.

createClientQueueBrowser

public BrokerClientQueueBrowser createClientQueueBrowser(java.lang.String client_id)
                                                  throws BrokerException
Creates a queue browser on the specified client. This queue browser can be used to browse events from the client's queue without holding queue lock. Since the queue is not locked, the queue content may change between operations on this browser.

Parameters:
client_id - The client on which the queue browser is requested.
Returns:
BrokerClientQueueBrowser object.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerUnknownClientIdException - If the client id specified does not exist on the broker.
BrokerException

createLockedClientQueueBrowser

public BrokerLockedClientQueueBrowser createLockedClientQueueBrowser(java.lang.String client_id)
                                                              throws BrokerException
Creates a locked queue browser on the specified client. The client queue is locked for the entire duration of this browser existence.

Parameters:
client_id - The client on which the queue browser is requested.
Returns:
BrokerLockedClientQueueBrowser object.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerUnknownClientIdException - If the client id specified does not exist on the broker.
BrokerClientQueueBrowserException - If the specified client queue is locked by some other queue browser.
BrokerException

createForwardQueueBrowser

public BrokerQueueBrowser createForwardQueueBrowser(java.lang.String remoteBroker)
                                             throws BrokerException
Creates a queue browser on the forwarding queue of the specified remote broker. This queue browser can be used to browse events from the forward queue without holding queue lock. Since the queue is not locked, the queue content may change between operations on this browser.

Parameters:
remoteBroker - The name of the remote broker for which the forward queue browser is requested.
Returns:
BrokerQueueBrowser object.
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerQueueBrowserException - If the forward queue for the remote broker specified does not exist on the broker.
BrokerIncompatibleVersionException - If the broker does not support forwad queue browsing.
BrokerException

createLockedForwardQueueBrowser

public BrokerLockedQueueBrowser createLockedForwardQueueBrowser(java.lang.String remoteBroker)
                                                         throws BrokerException
Creates a locked queue browser on the forwarding queue of the specified remote broker. The forward queue is locked for the entire duration of this browser existence.

Parameters:
remoteBroker - The name of the remote broker for which the forward queue browser is requested.
Returns:
BrokerLockedQueueBrowser object.
Throws:
BrokerInvalidClientException - If the forward queue has been destroyed or disconnected.
BrokerUnknownClientIdException - If the forward queue for the remote broker specified does not exist on the broker.
BrokerQueueBrowserException - If the specified forward queue is locked by some other queue browser.
BrokerException

getClientQueueBrowsers

public BrokerClientQueueBrowserInfo[] getClientQueueBrowsers(java.lang.String client_id)
                                                      throws BrokerException
Gets the list of QueueBrowsers opened by the specified client.

Parameters:
client_id - The client on which the list of queue browsers is requested.
Returns:
Array of BrokerQueueBrowserInfo
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerException

setRemoteBrokerKeepAlive

public void setRemoteBrokerKeepAlive(java.lang.String broker_name,
                                     int KeepAlive)
                              throws BrokerException
Sets or disables KeepAlive interval for the remote broker.

Parameters:
broker_name - - name of the broker
KeepAlive - - interval in seconds to send keep alive messages. If zero, sending Keep Alive messages will be disabled
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if broker name is null
BrokerOutOfRangeException - if KeepALive is < 0
BrokerUnknownBrokerNameException - if the broker_name cannot be found
BrokerNoPermissionException - if the current client do not have permission
BrokerNotInTerritoryException - if the broker do not belong to a territory
BrokerException

getRemoteBrokerKeepAlive

public int getRemoteBrokerKeepAlive(java.lang.String broker_name)
                             throws BrokerException
Returns KeepAlive interval for a remote broker. Zero return value indicates sending Keep Alive events is disabled

Parameters:
broker_name - - name of the remote broker
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if the broker name is null
BrokerUnknownBrokerNameException - if the broker_name cannot be found
BrokerNoPermissionException - if the current client do not have permission
BrokerNotInTerritoryException - if the broker do not belong to a territory
BrokerException

createCluster

public void createCluster(java.lang.String clusterName)
                   throws BrokerException
Create a new cluster with this broker as the first member. No warning will be issued if a cluster already exists which has the same name.

Throws:
BrokerInClusterException - If the broker is already a member of a cluster.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerInvalidClusterNameException - If the cluster name is not valid.
BrokerNoPermissionException - If the client does not have permission to modify the broker, or if the broker is not licensed for broker interconnection.
BrokerNullParameterException - If clusterName is null.
BrokerException

getClusterInfo

public BrokerClusterInfo getClusterInfo()
                                 throws BrokerException
Get the cluster's settings.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerException

addBrokerToCluster

public BrokerJoinFailureInfo addBrokerToCluster(java.lang.String broker_host,
                                                java.lang.String broker_name)
                                         throws BrokerException
Have this broker join the cluster of the specified other broker. May not pass in null for the broker name. Returns null on success. If there is a conflict of event types and/or client groups during the join, then you will get back an object listing the items that conflict.

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInClusterException - If the broker is already a member of a cluster.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker, or if the broker is not licensed for broker interconnection.
BrokerNotInClusterException - If the other broker is not a member of a cluster.
BrokerNullParameterException - If broker_host or broker_name are null.
BrokerOutOfRangeException - If there is another broker in the specified cluster with the same name as this broker.
BrokerSecurityException - If the cluster requires SSL and the joining broker does not support SSL.
BrokerUnknownBrokerNameException - If the specified broker does not exist.
BrokerSSLClusterException - If an error occurs during the SSL connection between the broker servers.
BrokerException

removeBrokerFromCluster

public void removeBrokerFromCluster(java.lang.String broker_host,
                                    java.lang.String broker_name)
                             throws BrokerException
Force the removal of a given broker from the cluster. This operation will return as soon as this broker has started the removal of the specified broker from the cluster. It may return before other members of the cluster are notified of this removal.

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If broker_host or broker_name are null.
BrokerOutOfRangeException - If attempt to remove the current broker.
BrokerUnknownBrokerNameException - If the specified broker on the specified host is not a member of the cluster.
BrokerException

leaveCluster

public void leaveCluster(int msecs,
                         boolean forced)
                  throws BrokerException
Make this broker leave its current cluster. This operation may take a while to complete because it requires talking to other brokers. Set msecs to BrokerClient.TIME_INFINITE (-1) if you want this operation to block until the leave operation is completed. If set to a shorter time, a timeout exception may be thrown before the operation is completed. Note that even if the timeout happens, any other operation on the broker made while the leave operation is in progress may also block and time out. If forced is true, then the broker will leave the cluster even if it cannot contact other members of the cluster to let them know within the broker's timeout period.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerException

createClusterGateway

public void createClusterGateway(java.lang.String cluster_name,
                                 java.lang.String broker_host,
                                 java.lang.String broker_name,
                                 boolean isPrimary)
                          throws BrokerException
Create a gateway to the specified cluster by having the current broker communicate with the broker specified by broker_host and broker_name. Note that this only creates one half of the cluster gateway. A similar call must be made on the other broker to complete the gateway. Until that is done, the gateway will be in an incomplete status.

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNotRunningException - If the host is found, but no server is running on that host.
BrokerNullParameterException - If cluster_name, broker_host, or broker_name are null.
BrokerOutOfRangeException - If this cluster is already connected to the named cluster through some other gateway, or if the primary gateway already exists to the specified cluster
BrokerUnknownBrokerNameException - If the specified broker does not exist.
BrokerUnknownClusterException - If the specified broker is not a member of the specified cluster.
BrokerException

destroyClusterGateway

public void destroyClusterGateway(java.lang.String cluster_name,
                                  java.lang.String broker_name)
                           throws BrokerException
Destroy a gateway to the specified cluster. Note that this only destroys one half of the gateway. A similar call must be made on the other broker to completely remove gateway. Until that is done, the gateway on the other broker will be in an incomplete status.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

getClusterGatewayStats

public BrokerEvent getClusterGatewayStats(java.lang.String cluster_name,
                                          java.lang.String broker_name)
                                   throws BrokerException
Get the cluster gateway statistics. Statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name or broker_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified territory from this broker.
BrokerException

getClusterGatewaySharedEventTypes

public BrokerSharedEventTypeInfo[] getClusterGatewaySharedEventTypes(java.lang.String cluster_name,
                                                                     java.lang.String broker_name)
                                                              throws BrokerException
Get the information on event types shared across a cluster gateway.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

setClusterPrimaryGateway

public void setClusterPrimaryGateway(java.lang.String cluster_name,
                                     java.lang.String broker_name)
                              throws BrokerException
Set the gateway connection to the input cluster and broker as the Primary Cluster gateway from this Broker to the remote cluster.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name or broker_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerIncompatibleVersionException - If the broker does not support Cluster Gateways. Cluster Gateways are supported only for version 8.0 and above.
BrokerException

setClusterGatewaySecurity

public void setClusterGatewaySecurity(java.lang.String cluster_name,
                                      java.lang.String broker_name,
                                      int auth_type,
                                      int encrypt_level)
                               throws BrokerException
Set the type of security used for the Cluster gateway. The current settings can be acquired using getLocalTerritoryGateways() or getAllTerritoryGateways(). The auth_type value can be any of the AUTH_TYPE_* values. The encrypt_level value can be any of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. Changing this value on a gateway can have major repercussions, so it should not be done lightly. It is recommended that the other broker be checked to make sure it is properly configured for the new mode prior to changing the mode. The change may take some time to take effect. WARNING: May cause your cluster gateway to become disconnected if the other brokers is not properly configured for this connection type. For example, requring SSL authentication or encryption when the other broker is not configured for SSL.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name or broker_name is null.
BrokerOutOfRangeException - If auth_type or encrypt_level are not valid values.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

getClusterGatewayACL

public BrokerAccessControlList getClusterGatewayACL(java.lang.String cluster_name)
                                             throws BrokerException
Get the access control list (ACL) which this broker is using to accept connections from the other broker across the gateway. The ACL will either have zero entries if no checking is done, and one entry if checking is enabled.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

setClusterGatewayACL

public void setClusterGatewayACL(java.lang.String cluster_name,
                                 java.lang.String broker_name,
                                 BrokerAccessControlList acl)
                          throws BrokerException
Set the access control list (ACL) which this broker will use to accept connections from the other broker across the gateway. Note that the ACL can only contain one entry (or no entries) in each of the user and authenticator lists. Changing the ACL will not cause an existing gateway connection to fail. WARNING: May cause your gateway to become disconnected if you disallow the user identity which the other broker is using to connect.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name, broker_name or acl are null.
BrokerOutOfRangeException - If the acl has more than one user entry or more than one auth entry in it.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerInvalidAccessListException - The DN access list contained invalid values.
BrokerException

getClusterGatewayRefuseAllUpdates

public boolean getClusterGatewayRefuseAllUpdates(java.lang.String cluster_name)
                                          throws BrokerException
Returns whether a cluster gateway refuses all updates.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

setClusterGatewayRefuseAllUpdates

public void setClusterGatewayRefuseAllUpdates(java.lang.String cluster_name,
                                              java.lang.String broker_name,
                                              boolean refuse_updates)
                                       throws BrokerException
Sets whether a cluster gateway refuses all updates.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If cluster_name or broker_name is null.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

getClusterGatewayKeepAlive

public int getClusterGatewayKeepAlive(java.lang.String cluster_name)
                               throws BrokerException
Returns KeepAlive interval on the gateway. Zero return value indicates sending Keep Alive events is disabled

Parameters:
cluster_name - - name of the cluster
Throws:
BrokerNullParameterException - if cluster name is null
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerException

setClusterGatewayKeepAlive

public void setClusterGatewayKeepAlive(java.lang.String cluster_name,
                                       java.lang.String broker_name,
                                       int KeepAlive)
                                throws BrokerException
Sets or disables KeepAlive interval on the gateway.

Parameters:
cluster_name - - name of the cluster
broker_name - - name of the broker
KeepAlive - - interval in seconds to send keep alive messages. If zero, sending Keep Alive messages will be disabled
Throws:
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if cluster_name or broker_name is null
BrokerOutOfRangeException - if KeepALive is < 0
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerIncompatibleVersionException - If the Broker version does not support this feature.
BrokerException

setClusterGatewayPause

public void setClusterGatewayPause(java.lang.String cluster_name,
                                   java.lang.String broker_name,
                                   boolean pause)
                            throws BrokerException
Pauses or resumes a cluster gateway

Parameters:
cluster_name - - name of the cluster
broker_name - - name of the broker within this cluster
pause - - state of the gateway to set (true - paused, false - resumed)
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected..
BrokerNullParameterException - If cluster_name or broker_name is null
BrokerBadStateException - If cluster gateway is already paused or resumed
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
BrokerIncompatibleVersionException - If the Broker version does not support this feature.
BrokerQueueBrowserException - The gateway forwarding queue is locked by a queue browser.
BrokerException

getClusterStaticGatewayForwarding

public boolean getClusterStaticGatewayForwarding(java.lang.String cluster_name)
                                          throws BrokerException
Get current static gateway forwarding status.

Parameters:
cluster_name - Name of the remote cluster.
Returns:
Returns true if the static gateway subscription is set on the given remote cluster from the current broker. Returns false, if not set.
Throws:
BrokerInvalidClientException - If the client is not valid.
BrokerNotInClusterException - If the broker is not part of a cluster.
BrokerUnknownClusterException - If there is no gateway to the specified cluster.
BrokerNullParameterException - If cluster name is null
BrokerException

setClusterStaticGatewayForwarding

public void setClusterStaticGatewayForwarding(java.lang.String cluster_name,
                                              java.lang.String broker_name,
                                              boolean enable)
                                       throws BrokerException
Enable or disable static gateway forwarding,

Parameters:
cluster_name - - name of the remote cluster
broker_name - - name of the remote broker
enable - - state of the static gateway subscription to set (true - enable, false - disable)
Throws:
BrokerNotInClusterException - If the broker is not part of a cluster.
BrokerUnknownClusterException - If there is no gateway to the specified cluster.
BrokerInvalidClientException - if the client is not valid.
BrokerNullParameterException - if cluster_name or broker_name is null
BrokerException

getLocalClusterGateways

public BrokerClusterGatewayInfo[] getLocalClusterGateways()
                                                   throws BrokerException
Get the list of clusters this broker is a gateway for.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerException

getAllClusterGateways

public BrokerClusterGatewayInfo[] getAllClusterGateways()
                                                 throws BrokerException
Get the list of clusters accessible from this broker either through local gateways or gateways from other brokers.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerException

getBrokersInCluster

public BrokerInfo[] getBrokersInCluster()
                                 throws BrokerException
Get the list of brokers in the cluster, including this broker. This broker is always first in the list.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not part of a cluster.
BrokerException

getClusterStats

public BrokerEvent getClusterStats()
                            throws BrokerException
Get the cluster statistics. Statistics are set into a BrokerEvent as fields. The available values are:

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not part of a cluster.
BrokerException

getClusterACL

public BrokerAccessControlList getClusterACL()
                                      throws BrokerException
Get the access control list (ACL) which brokers in the cluster are using to accept connections from other brokers in their cluster.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to browse the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerSecurityException - If secure sockets are not supported or are not enabled on the Broker.
BrokerException

setClusterACL

public void setClusterACL(BrokerAccessControlList acl)
                   throws BrokerException
Set the access control list (ACL) which brokers in this cluster will use to accept connections from other brokers in the cluster. Changing the ACL will not cause existing inter-broker connections to fail. WARNING: May cause your cluster to become partially disconnected if you disallow the user identity which a cluster member is using to connect.

Throws:
BrokerInvalidAccessListException - If the access list is not valid.
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerNullParameterException - If acl is null.
BrokerException

setClusterSecurity

public void setClusterSecurity(int auth_type,
                               int encrypt_level)
                        throws BrokerException
Set the type of security used in the cluster. The current settings can be acquired using getClusterInfo(). The auth_type value can be any of the AUTH_TYPE_* values. The encrypt_level value can be any of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. Changing this value on a cluster can have major repercussions, so it should not be done lightly. It is recommended that all brokers in the cluster be checked to make sure they are properly configured for the new mode prior to changing the mode. The change may take some time to propagate among the brokers. WARNING: May cause your cluster to become partially disconnected if any member brokers are not properly configured for this connection type. For example, requring SSL authentication or encryption when one or more brokers are not even configured for SSL.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerNoPermissionException - If the client does not have permission to modify the broker.
BrokerNotInClusterException - If the broker is not a member of a cluster.
BrokerOutOfRangeException - If auth_type or encrypt_level are not valid values.
BrokerException

webMethods Broker Administration Java API
Version 9.5.1.0.171 091713


Copyright © 2001 - 2013 Software AG Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their suppliers.