Package COM.activesw.api.client
Class BrokerAdminClient
java.lang.Object
COM.activesw.api.client.BrokerClient
COM.activesw.api.client.BrokerAdminClient
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
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_1015, VERSION_105, VERSION_111, 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
ConstructorsModifierConstructorDescriptionprotected
BrokerAdminClient
(String broker_host, String broker_name, String client_id, BrokerConnectionDescriptor desc) Protected reconnect constructor.BrokerAdminClient
(String broker_host, String broker_name, String client_id, String client_group, String app_name, BrokerConnectionDescriptor desc) Creates an administrative client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortForced
(long tx_id) Forcibly abort a transaction.void
abortForced
(long[] tx_ids) Forcibly abort a list of transactions.Acquire the per-Broker change lock.addBrokerToCluster
(String broker_host, String broker_name) Have this broker join the cluster of the specified other broker.int
Check for inactivity and restart forwarding documemnts on all territory and gateway brokers on this broker.int
checkAndRestartForwarding
(String remote_broker_name) Check for inactivity and restart forwarding documemnts across the specfied territory or gateway broker.void
clearClientQueueById
(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
(String client_id, String client_group, String app_name, String user_name, String authenticator_name, BrokerConnectionDescriptor desc) Create a new client on the broker.void
createClientGroup
(String client_group_name, int life_cycle, int storage_type) Create a client group on the broker.createClientQueueBrowser
(String client_id) Creates a queue browser on the specified client.void
createClientSubscriptionById
(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
(String client_id, BrokerSubscription[] subs) Open multiple subscriptions for a client at one time.void
createCluster
(String clusterName) Create a new cluster with this broker as the first member.void
createClusterGateway
(String cluster_name, String broker_host, 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.createForwardQueueBrowser
(String remoteBroker) Creates a queue browser on the forwarding queue of the specified remote broker.createLockedClientQueueBrowser
(String client_id) Creates a locked queue browser on the specified client.createLockedForwardQueueBrowser
(String remoteBroker) Creates a locked queue browser on the forwarding queue of the specified remote broker.void
createTerritory
(String territory_name) Create a new territory with this broker as the first member.void
createTerritoryGateway
(String territory_name, String broker_host, 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
Destroy this Broker.void
destroyClientById
(String client_id) Destroy the specified client.void
destroyClientGroup
(String client_group_name, boolean force_destroy) Destroy the named client group.void
destroyClientSubscriptionById
(String client_id, BrokerSubscription sub) Cancel a subscription for a client with matching event type and filter.void
destroyClientSubscriptionsById
(String client_id, BrokerSubscription[] subs) Cancel multiple subscriptions for a client with matching event types and filters.void
destroyClusterGateway
(String cluster_name, String broker_name) Destroy a gateway to the specified cluster.void
destroyEventType
(String event_type_name, boolean force_destroy) Destroy the named event type.void
destroyEventTypeInfoset
(String event_type_name, String infoset_name) Destroy the specified infoset for the specified event type.void
destroyEventTypeInfosets
(String event_type_name, String[] infoset_names) Destroy the specified infosets for the specified event type.void
destroyEventTypes
(String[] event_type_names, boolean force_destroy) Destroy the named event types.void
destroyTerritoryGateway
(String territory_name) Destroy a gateway to the specified territory.void
disconnectClientById
(String client_id) Disconnect all sessions for the specified client.void
disconnectClientSessionById
(String client_id, int session_id) Disconnect the specified session for the specified client.boolean
doesClientSubscriptionExistById
(String client_id, String event_type_name, String filter) Test if a subscription exists on the client with the given event type name and filter.void
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.getActivityTraces
(int seqn, int msecs) Get an array of broker activity traces.Get the list of clusters accessible from this broker either through local gateways or gateways from other brokers.Deprecated.Get the list of territories accessible from this broker either through local gateways or gateways from other brokers.Get the broker descriptionGet the list of brokers in the cluster, including this broker.Get the list of brokers in the territory, including this broker.Get the Broker statistics.getClientGroupACL
(String client_group_name) Get the specified client group's access control list (ACL).String[]
getClientGroupCanPublishList
(String client_group_name) Get the list of event types the client group can publish or deliver.String[]
getClientGroupCanSubscribeList
(String client_group_name) Get the list of event types the client group can subscribe to or have delivered to it.getClientGroupInfo
(String client_group_name) Get the specified client group's information.getClientGroupInfos
(String[] client_group_names) Get the client group information for the requested client groups.String[]
getClientGroupLogAcknowledgeList
(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.String[]
getClientGroupLogPublishList
(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.String[]
Get the list of client group names from the broker.getClientGroupStats
(String client_group_name) Get the specified client group's statistics.String[]
getClientGroupsWhichCanLogAcknowledge
(String event_type_name) Get the list of client groups which can log acknowledgement of the specified event type.String[]
getClientGroupsWhichCanLogPublish
(String event_type_name) Get the list of client groups which can log publish of the specified event type.String[]
getClientGroupsWhichCanPublish
(String event_type_name) Get the list of client groups which can publish the specified event type.String[]
getClientGroupsWhichCanSubscribe
(String event_type_name) Get the list of client groups which can subscribe the specified event type.String[]
Get the IDs of all the clients in the Broker.String[]
getClientIdsByClientGroup
(String client_group_name) Get the IDs of all the clients in the Broker which are members of the specified client group.String[]
getClientIdsWhichAreSubscribed
(String event_type_name) Get the IDs of all the clients in the Broker which are subscribed to the specified event type.getClientInfoById
(String client_id) Get the specified client's information.getClientInfosById
(String[] client_ids) Get the client information for the requested clients.getClientInfosetById
(String client_id) Get the infoset for this client.getClientQueueBrowsers
(String client_id) Gets the list of QueueBrowsers opened by the specified client.getClientStatsById
(String client_id) Get a client's statistics.getClientStatsByIds
(String[] client_ids) Get statistics for the list of client IDs.getClientSubscriptionsById
(String client_id) Get the list of open subscriptions for a client.Get the access control list (ACL) which brokers in the cluster are using to accept connections from other brokers in their cluster.getClusterGatewayACL
(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
(String cluster_name) Returns KeepAlive interval on the gateway.boolean
getClusterGatewayRefuseAllUpdates
(String cluster_name) Returns whether a cluster gateway refuses all updates.getClusterGatewaySharedEventTypes
(String cluster_name, String broker_name) Get the information on event types shared across a cluster gateway.getClusterGatewayStats
(String cluster_name, String broker_name) Get the cluster gateway statistics.Get the cluster's settings.boolean
getClusterStaticGatewayForwarding
(String cluster_name) Get current static gateway forwarding status.Get the cluster statistics.getEventAdminTypeDef
(String event_type_name) Get the specified event type's definition.getEventAdminTypeDefs
(String[] event_type_names) Get the definitions for the requested event types.getEventAdminTypeDefsByScope
(String scope_name) Get the definitions for the event types within the named scope.boolean
getEventTypeStats
(String event_type_name) Get statistics for an event type.Get the list of heuristic transactions in the Broker transaction manager.Get the list of clusters this broker is a gateway for.Get the list of territories this broker is a gateway for.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
Returns the number of events in the broker's log.int
Get the default post-prepare timeout.int
Get the post-prepare timeout action.int
Get the default pre-prepare timeout.int
Gets the global recover mode.int
getRemoteBrokerKeepAlive
(String broker_name) Returns KeepAlive interval for a remote broker.boolean
getStaticGatewayForwarding
(String territory_name) Get current static gateway forwarding status.Get the access control list (ACL) which brokers in the territory are using to accept connections from other brokers in their territory.getTerritoryGatewayACL
(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
(String territory_name) Returns KeepAlive interval on the gateway.boolean
getTerritoryGatewayRefuseAllUpdates
(String territory_name) Returns whether a territory gateway refuses all updates.getTerritoryGatewayRefuseEventTypeUpdates
(String territory_name) Returns which event types a territory gateway refuses updates for.getTerritoryGatewaySharedEventTypes
(String territory_name) Get the information on event types shared across a territory gateway.getTerritoryGatewayStats
(String territory_name) Get the territory gateway statistics.Get the territory's settings.Get the territory statistics.Get the list of current transactions in the Broker transaction manager.getTransactionsByClient
(String client_id) Get the list of a client's transactions in the Broker transaction manager.joinTerritory
(String broker_host, 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
(String broker_host, String broker_name, String client_id, String client_group, String app_name, BrokerConnectionDescriptor desc) Attempts to create the administrative client.static BrokerAdminClient
reconnectAdmin
(String broker_host, String broker_name, String client_id, BrokerConnectionDescriptor desc) Reconnects an administrative client.void
Release the per-Broker change lock.void
removeBrokerFromCluster
(String broker_host, String broker_name) Force the removal of a given broker from the cluster.void
removeBrokerFromTerritory
(String broker_host, String broker_name) Force the removal of a given broker from the territory.void
setBrokerDescription
(String description) Set the broker descriptionvoid
setClientGroupAccessLabelRequired
(String client_group_name, boolean required) Set whether or not an access label is required for connecting to a client group.void
setClientGroupACL
(String client_group_name, BrokerAccessControlList acl) Set the specified client group's access control list (ACL).void
setClientGroupCanPublishList
(String client_group_name, String[] event_type_names) Set the list of event types the client group can publish to deliver.void
setClientGroupCanSubscribeList
(String client_group_name, String[] event_type_names) Set the list of event types the client group can subscribe to or have delivered to it.void
setClientGroupDescription
(String client_group_name, String description) Set the description string for a client group.void
setClientGroupLogAcknowledgeList
(String client_group_name, 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
(String client_group_name, 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
(String client_group_name, int level) Set the required encryption for a client group.void
setClientInfosetById
(String client_id, BrokerEvent infoset) Set the infoset for a client.void
setClientLastPublishSequenceNumberById
(String client_id, long seqn) Set a client's high publisher sequence number.void
setClientStateShareLimitById
(String client_id, int limit) Set a client's state share limit.void
Set the access control list (ACL) which brokers in this cluster will use to accept connections from other brokers in the cluster.void
setClusterGatewayACL
(String cluster_name, 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
(String cluster_name, String broker_name, int KeepAlive) Sets or disables KeepAlive interval on the gateway.void
setClusterGatewayPause
(String cluster_name, String broker_name, boolean pause) Pauses or resumes a cluster gatewayvoid
setClusterGatewayRefuseAllUpdates
(String cluster_name, String broker_name, boolean refuse_updates) Sets whether a cluster gateway refuses all updates.void
setClusterGatewaySecurity
(String cluster_name, String broker_name, int auth_type, int encrypt_level) Set the type of security used for the Cluster gateway.void
setClusterGatewaySharedEventTypes
(String cluster_name, String broker_name, BrokerSharedEventTypeInfo[] infos) Set the complete list of shared event types on a cluster gateway.void
setClusterPrimaryGateway
(String cluster_name, 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
(String cluster_name, 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
(String event_type_name, String infoset_name, BrokerEvent infoset) Set the specified infoset for an event type.void
setEventTypeInfosets
(String event_type_name, BrokerEvent[] infosets) Set the specified infosets for the specified event type.setEventTypesAndClientGroups
(String[] event_type_names_to_destroy, 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
(String event_name, 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
(String broker_name, int KeepAlive) Sets or disables KeepAlive interval for the remote broker.void
setStaticGatewayForwarding
(String territory_name, boolean enable) Enable or disable static gateway forwarding,void
Set the access control list (ACL) which brokers in this territory will use to accept connections from other brokers in the territory.void
setTerritoryGatewayACL
(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
(String territory_name, int KeepAlive) Sets or disables KeepAlive interval on the gateway.void
setTerritoryGatewayPause
(String territory_name, boolean pause) Pauses or resumes gatewayvoid
setTerritoryGatewayRefuseAllUpdates
(String territory_name, boolean refuse_updates) Sets whether a territory gateway refuses all updates.void
setTerritoryGatewayRefuseEventTypeUpdates
(String territory_name, BrokerSharedEventTypeRefuseUpdateInfo[] infos) Sets which event types a territory gateway refuses updates for.void
setTerritoryGatewaySecurity
(String territory_name, int auth_type, int encrypt_level) Set the type of security used for the territory gateway.void
setTerritoryGatewaySharedEventTypes
(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 String
transactionStateToString
(int state) Returns a String object representing the specified Broker Transaction Manager's transaction state.int
updateRemoteBrokerHostname
(String remote_broker_name, String new_hostname) Updates the hostname for the particular remote broker.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
-
Field Details
-
LIFECYCLE_DESTROY_ON_DISCONNECT
public static final int LIFECYCLE_DESTROY_ON_DISCONNECT- See Also:
-
LIFECYCLE_EXPLICIT_DESTROY
public static final int LIFECYCLE_EXPLICIT_DESTROY- See Also:
-
AUTH_TYPE_NONE
public static final int AUTH_TYPE_NONE- See Also:
-
AUTH_TYPE_SSL
public static final int AUTH_TYPE_SSL- See Also:
-
TRANSACTION_OPEN
public static final int TRANSACTION_OPEN- See Also:
-
TRANSACTION_COMMIT
public static final int TRANSACTION_COMMIT- See Also:
-
TRANSACTION_ROLLBACK
public static final int TRANSACTION_ROLLBACK- See Also:
-
TRANSACTION_END_SUCCESS
public static final int TRANSACTION_END_SUCCESS- See Also:
-
TRANSACTION_ROLLBACK_ONLY
public static final int TRANSACTION_ROLLBACK_ONLY- See Also:
-
TRANSACTION_PREPARED
public static final int TRANSACTION_PREPARED- See Also:
-
TRANSACTION_HEURISTIC_COMMIT
public static final int TRANSACTION_HEURISTIC_COMMIT- See Also:
-
TRANSACTION_HEURISTIC_ROLLBACK
public static final int TRANSACTION_HEURISTIC_ROLLBACK- See Also:
-
TRANSACTION_FAILING
public static final int TRANSACTION_FAILING- See Also:
-
TRANSACTION_PREPARING
public static final int TRANSACTION_PREPARING- See Also:
-
TRANSACTION_FINISHING
public static final int TRANSACTION_FINISHING- See Also:
-
TRANSACTION_UNKNOWN
public static final int TRANSACTION_UNKNOWN- See Also:
-
DEFAULT_STAT_PACKET_LENGTH
public static final int DEFAULT_STAT_PACKET_LENGTH- See Also:
-
RECOVER_RESTRICTED
public static final int RECOVER_RESTRICTED- See Also:
-
RECOVER_GLOBAL
public static final int RECOVER_GLOBAL- See Also:
-
-
Constructor Details
-
BrokerAdminClient
public BrokerAdminClient(String broker_host, String broker_name, String client_id, String client_group, 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(String broker_host, String broker_name, String client_id, BrokerConnectionDescriptor desc) throws BrokerException Protected reconnect constructor. See reconnect() for details.- Throws:
BrokerException
-
-
Method Details
-
reconnectAdmin
public static BrokerAdminClient reconnectAdmin(String broker_host, String broker_name, 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(String broker_host, String broker_name, String client_id, String client_group, 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(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 permissionBrokerNullParameterException
- If client_group_name is null.BrokerOutOfRangeException
- If the life cycle or storage type are not a valid values.BrokerException
-
destroyClientGroup
public void destroyClientGroup(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
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
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
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
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 String[] getClientGroupsWhichCanLogAcknowledge(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
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(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(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(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(String client_group_name, 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
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(String client_group_name, 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
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(String client_group_name, 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
Get the specified client group's statistics. The statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- createTime -- (date) Time when the client group was created.
- updateTime -- (date) Time when the client group was last updated. Forever (zero date and time) if not updated after created.
- numEventsPublished -- (int) Number of events published by member clients.
- numEventsDelivered -- (int) Number of events delivered by member clients.
- lastEventPublishTime -- (date) Time when last event was published by a member. Forever (zero date and time) if no member ever published.
- lastEventDeliveryTime -- (date) Time when last event was delivered by a member. Forever (zero date and time) if no member ever delivered.
- 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
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(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
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
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
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(String client_id, String client_group, String app_name, String user_name, 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
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
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
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
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
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
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
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
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(String client_id, String event_type_name, 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(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(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(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(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
-
setClientLastPublishSequenceNumberById
public void setClientLastPublishSequenceNumberById(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
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
Get a client's statistics. The statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- createTime -- (date) Time when the client was created.
- numEventsPublished -- (long) Number of events published by this client.
- numEventsPublished -- (int) Deprecated. Number of events published by this client.
- numEventsDelivered -- (long) Number of events delivered by this client.
- numEventsDelivered -- (int) Deprecated. Number of events delivered by this client.
- numEventsQueued -- (int) Number of events queued for this client.
- numEventsRetrieved -- (int) Number of events retrieved by this client.
- numEventsUnacked -- (int) Number of unacknowledged events for this client.
- lastEventPublishTime -- (date) Time when last event was published by this client. Forever (zero date and time) if never published.
- lastEventDeliveryTime -- (date) Time when last event was delivered by this client. Forever (zero date and time) if never delivered.
- lastEventQueueTime -- (date) Time when last event was queued for this client. Forever (zero date and time) if never had an event queued.
- lastEventRetrieveTime -- (date) Time when last event was retrieved by this client. Forever (zero date and time) if never retrieved an event.
- lastRetrieveSession -- (int) Session Id of the last retrieve session.
- lastConnectTime -- (date) Time when last session connected.
- lastConnectSession -- (long) Session Id of the last connected session.
- lastConnectSession -- (int) Deprecated. Session Id of the last connected session.
- lastDisconnectTime -- (date) Time when last session disconnected.
- lastDisconnectSession -- (long) Session Id of the last disconnected session.
- lastDisconnectSession -- (int) Deprecated. Session Id of the last disconnected session.
- queueLength -- (long) Number of events in client queue.
- queueByteSize -- (long) Number of bytes worth of events in client queue.
- queueHighestLength -- (long) Highest value of queueLength.
- queueHighestLengthTime -- (date) Time when queueHighestLength was last set. Forever (zero date and time) if never had an event queued.
- queueScans -- (long) Number of queue scans.
- 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
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:- now -- (date) Current time on the broker host.
- createTime -- (date) Time when the client was created.
- numEventsPublished -- (long) Number of events published by this client.
- numEventsPublished -- (int) Deprecated. Number of events published by this client.
- numEventsDelivered -- (long) Number of events delivered by this client.
- numEventsDelivered -- (int) Deprecated. Number of events delivered by this client.
- numEventsQueued -- (int) Number of events queued for this client.
- numEventsRetrieved -- (int) Number of events retrieved by this client.
- numEventsUnacked -- (int) Number of unacknowledged events for this client.
- lastEventPublishTime -- (date) Time when last event was published by this client. Forever (zero date and time) if never published.
- lastEventDeliveryTime -- (date) Time when last event was delivered by this client. Forever (zero date and time) if never delivered.
- lastEventQueueTime -- (date) Time when last event was queued for this client. Forever (zero date and time) if never had an event queued.
- lastEventRetrieveTime -- (date) Time when last event was retrieved by this client. Forever (zero date and time) if never retrieved an event.
- lastRetrieveSession -- (int) Session Id of the last retrieve session.
- lastConnectTime -- (date) Time when last session connected.
- lastConnectSession -- (long) Session Id of the last connected session.
- lastConnectSession -- (int) Deprecated. Session Id of the last connected session.
- lastDisconnectTime -- (date) Time when last session disconnected.
- lastDisconnectSession -- (long) Session Id of the last disconnected session.
- lastDisconnectSession -- (int) Deprecated. Session Id of the last disconnected session.
- queueLength -- (long) Number of events in client queue.
- queueByteSize -- (long) Number of bytes worth of events in client queue.
- queueHighestLength -- (long) Highest value of queueLength.
- queueHighestLengthTime -- (date) Time when queueHighestLength was last set. Forever (zero date and time) if never had an event queued.
- queueScans -- (long) Number of queue scans.
- 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
Deprecated.Deprecated in webMethods Broker 10.5, instead usegetClientStatsById(java.lang.String)
,getClientStatsByIds(java.lang.String[])
Get All client's statistics. The statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- createTime -- (date) Time when the client was created.
- numEventsPublished -- (int) Number of events published by this client. OR
- numEventsForwarded -- (int) Number of events forwarded by this forward queue.
- numEventsDelivered -- (int) Number of events delivered by this client. OR
- numEventsReceived -- (int) Number of events received by this forward queue.
- numEventsQueued -- (int) Number of events queued for this client. OR
- numEventsEnqueued -- (int) Number of events enqueued for this forward queue.
- numEventsRetrieved -- (int) Number of events retrieved by this client.
- lastEventPublishTime -- (date) Time when last event was published by this client. Forever (zero date and time) if never published. OR
- lastEventForwardTime -- (date) Time when last event was forwarded by this forward queue. Forever (zero date and time) if never forwarded.
- lastEventDeliveryTime -- (date) Time when last event was delivered by this client. Forever (zero date and time) if never delivered. OR
- lastEventReceiveTime -- (date) Time when last event was received by this forward queue. Forever (zero date and time) if never received.
- lastEventQueueTime -- (date) Time when last event was queued for this client. Forever (zero date and time) if never had an event queued.
- lastEventRetrieveTime -- (date) Time when last event was retrieved by this client. Forever (zero date and time) if never retrieved an event.
- lastConnectTime -- (date) Time when last session connected.
- lastConnectSession -- (int) Session Id of the last connected session.
- lastDisconnectTime -- (date) Time when last session disconnected.
- lastDisconnectSession -- (int) Session Id of the last disconnected session.
- queueLength -- (long) Number of events in client queue.
- queueByteSize -- (long) Number of bytes worth of events in client queue.
- queueHighestLength -- (long) Highest value of queueLength.
- queueScans -- (long) Number of queue scan.
- queueHighestLengthTime -- (date) Time when queueHighestLength was last set. Forever (zero date and time) if never had an event queued.
- 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
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(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
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
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
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
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
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
Get statistics for an event type. Statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- createTime -- (date) Time when the event type was created.
- updateTime -- (date) Time when the event type was last changed. This includes changes to the definition, time to live, or any infoset. Forever (zero date and time) if never changed after created.
- numEventsPublished -- (int) Number of events of this type published.
- numEventsDelivered -- (int) Number of events of this type delivered.
- lastEventPublishTime -- (date) Time when last event of this type was published. Forever (zero date and time) if never published.
- lastEventDeliveryTime -- (date) Time when last event of this type was delivered. Forever (zero date and time) if never delivered.
- numClientSubscriptions -- (int) Number of subscriptions open which include this event type.
- numForwardsReceived -- (int) Number of events of this type received via forwarding from another broker.
- lastForwardReceivedTime -- (date) Time when last event of this type was received via forwarding from another broker.
- numGroupsCanPublish -- (int) Number of client groups that can publish this event type.
- numGroupsCanSubscribe -- (int) Number of client groups that can subscribe to this event type.
- 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(String event_type_name, 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(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(String event_type_name, 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(String event_type_name, 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(String[] event_type_names_to_destroy, 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
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
Get the Broker statistics. Statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the Broker host.
- createTime -- (date) Time when the Broker was created.
- numClients -- (int) Number of clients on the Broker (connected or not).
- numEventTypes -- (int) Number of event types installed.
- numEventsPublished -- (long) Number of events published by all clients.
- numEventsPublished -- (int) Deprecated. Number of events published by all clients.
- numEventsDelivered -- (long) Number of events delivered by all clients.
- numEventsDelivered -- (int) Deprecated. Number of events delivered by all clients.
- numTracesPublished -- (long) Number of trace events published by the Broker.
- numTracesPublished -- (int) Deprecated. Number of trace events published by the Broker.
- numEventsQueued -- (long) Number of events placed in client queues.
- numEventsQueued -- (int) Deprecated. Number of events placed in client queues.
- retryQueueMaxPublishes -- (int) Maximum number of publishes.This number starts at 1024 and grows.
- retryQueueMaxEvents -- (int) Maximum number of events.This number starts at 2560 and grows.
- retryQueueNextOpsSequenceNum -- (int) Next operation sequence number.
- retryQueueReservedTotalPublishes -- (int) Total number of reserved publishes.
- retryQueueReservedGuaranteedPublishes -- (int) Number of guaranteed publishes.
- retryQueueReservedVolatilePublishes -- (int) Number of volatile publishes.
- retryQueueReservedGuaranteedEvents -- (int) Number of guaranteed events.
- retryQueueReservedVolatileEvents -- (int) Number of volatile events.
- retryQueueCurrentPublishes -- (int) Number of current publishes.
- retryQueueCurrentEvents -- (int) Number of current events.
- traceNumEventsQueued -- (int) Number of events placed in queue.
- traceLastEventEnqueueTime -- (date) Time when last event was enqueued.
- traceQueueLength -- (long) Number of events in queue.
- traceQueueByteSize -- (long) Number of bytes worth of events in queue.
- traceQueueHighestLength -- (long) Highest value of traceQueueLength.
- traceQueueHighestLengthTime -- (date) Time when traceQueueHighestLength was last set. Forever (zero date and time) if never had an event queued.
- Throws:
BrokerInvalidClientException
- If the client has been destroyed or disconnected.BrokerNoPermissionException
- If the client does not have permission to browse the Broker.BrokerException
-
getBrokerDescription
Get the broker description- Throws:
BrokerInvalidClientException
- If the client has been destroyed or disconnected.BrokerException
-
setBrokerDescription
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
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
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
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
Get the territory statistics. Statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- territoryName -- (unicode string) The name of the territory.
- brokers -- (structure array) An array of structures describing statistics about other each broker in the territory.
- brokers[].brokerHost -- (unicode string) Broker host name.
- brokers[].brokerName -- (unicode string) Broker name.
- brokers[].description -- (unicode string) Broker description.
- brokers[].connectedFrom -- (unicode string) IP address where broker is currently connected from. "" if not connected.
- brokers[].lastConnectTime -- (date) The time when the broker last connected. Forever (zero date and time) if never connected.
- brokers[].numEventsForwarded -- (int) Number of events forwarded to the broker.
- brokers[].numEventsReceived -- (int) Number of events received from the broker.
- brokers[].lastEventForwardTime -- (date) Time when an event was last forwarded to the broker. Forever (zero date and time) if never forwarded.
- brokers[].lastEventReceiveTime -- (date) Time when an event was last received from the broker. Forever (zero date and time) if never received.
- brokers[].numEventsEnqueued -- (int) Number of events enqueued for the broker.
- brokers[].lastEventEnqueueTime -- (date) Time when an event was last enqueued for the broker.
- brokers[].queueLength -- (long) The current size (in number of events) of the broker's queue.
- brokers[].queueByteSize -- (long) The current size (in bytes) of the broker's queue.
- brokers[].queueHighestLength -- (long) The highest length (in number of events) of the broker's queue.
- brokers[].queueHighestLengthTime -- (date) Time when queueHighestLength was last changed.
- brokers[].encryptProtocol -- (unicode string) The protocol being used for encryption to this broker. This field is set only if connectedFrom is not "" and if encryption is used. The only currently supported value is "SSL".
- brokers[].encryptVersion -- (unicode string) The version of the encryption protocol. Not set if encryptProtocol is not set. Currently supported values are "2" and "3".
- brokers[].encryptLevel -- (unicode string) The level of encryption being used to this broker. Not set if encryptProtocol is not set. Currently supported values are "USDomestic" and "USExport".
- brokers[].authProtocol -- (unicode string) The protocol being used to authenticate the broker. This field is only set if connectedFrom is not "" and if authentication is used. The only currently supported value is "SSL".
- brokers[].authVersion -- (unicode string) The version of the authentication protocol. Not set if authProtocol is not set. Currently supported values are "2" and "3".
- brokers[].sslDistinguishedName -- (unicode string) The distinguished name of the other broker. This field is only set if authProtocol is set to "SSL".
- brokers[].sslIssuerDistinguishedName -- (unicode string) The distinguished name of the issuer of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertStatus -- (unicode string) The status of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertSerialNumber -- (unicode string) The serial number of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertBeginDate -- (date) The beginning date that the other broker's certificate is valid from. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertEndDate -- (date) The end date to which the other broker's certificate is valid to. This field is only set if authProtocol is set to "SSL".
- 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
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(String broker_host, 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.COM.activesw.api.client.BrokerSSLTerritoryException
- If an error occurs during the SSL connection between the broker servers.BrokerException
-
leaveTerritory
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(String broker_host, 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
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
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
-
updateRemoteBrokerHostname
public int updateRemoteBrokerHostname(String remote_broker_name, String new_hostname) throws BrokerException Updates the hostname for the particular remote broker. If the remote broker is found in the territory/cluster, its corresponding hostname is changed to the new hostname. This change is also persisted in the broker's storage. It does not propagates any updates to rest of the territory/cluster. If there are more brokers in territory/cluster/gateways that needs the change, they must be updated individually using this API.- Returns:
- 0 for success. 1 for failure. 2 for Remote broker hostname update is successful. It will take effect after the connection to remote broker is restarted.
- Throws:
BrokerInvalidClientException
- If the client has been destroyed or disconnected.BrokerNullParameterException
- If the arguments remote_broker_name or new_hostname is null or empty.BrokerNoPermissionException
- If the client does not have permission to modify the broker.BrokerNotInTerritoryException
- If the broker is not a member of a territory/cluster.BrokerIncompatibleVersionException
- If the Broker version does not support this feature.BrokerException
-
getTerritoryACL
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
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(String territory_name, String broker_host, 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
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
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
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(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
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(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
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(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(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
-
getTerritoryGatewayStats
Get the territory gateway statistics. Statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- remoteTerritoryName -- (unicode string) The name of the territory remote to Broker.
- gatewayHost -- (unicode string) Gateway broker's host name.
- gatewayBrokerName -- (unicode string) Gateway broker's name.
- connectedFrom -- (unicode string) IP address where broker is currently connected from. "" if not connected.
- lastConnectTime -- (date) The time when the broker last connected. Forever (zero date and time) if never connected.
- numEventsForwarded -- (int) Number of events forwarded across the gateway.
- numEventsReceived -- (int) Number of events received across the gateway.
- lastEventForwardTime -- (date) Time when an event was last forwarded across the gateway. Forever (zero date and time) if never forwarded.
- lastEventReceiveTime -- (date) Time when an event was last received across the gateway. Forever (zero date and time) if never received.
- numEventsEnqueued -- (int) Number of events enqueued for the gateway.
- lastEventEnqueueTime -- (date) Time when an event was last enqueued for the gateway.
- queueLength -- (long) The current size (in number of events) of the gateway's queue.
- queueByteSize -- (long) The current size (in bytes) of the gateway's queue.
- queueHighestLength -- (long) The highest length (in number of events) of the gateway's queue.
- queueHighestLengthTime -- (date) Time when queueHighestLength was last changed.
- encryptProtocol -- (unicode string) The protocol being used for encryption to this broker. This field is set only if connectedFrom is not "" and if encryption is used. The only currently supported value is "SSL".
- encryptVersion -- (unicode string) The version of the encryption protocol. Not set if encryptProtocol is not set. Currently supported values are "SSLv2", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", and "TLSv1.3"
- encryptLevel -- (unicode string) The level of encryption being used to this broker. Not set if encryptProtocol is not set. Currently supported values are "USDomestic" and "USExport".
- authProtocol -- (unicode string) The protocol being used to authenticate the broker. This field is only set if connectedFrom is not "" and if authentication is used. The only currently supported value is "SSL".
- authVersion -- (unicode string) The version of the authentication protocol. Not set if authProtocol is not set. Currently supported values are "SSLv2", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", and "TLSv1.3"
- sslDistinguishedName -- (unicode string) The distinguished name of the other broker. This field is only set if authProtocol is set to "SSL".
- sslIssuerDistinguishedName -- (unicode string) The distinguished name of the issuer of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- sslCertStatus -- (unicode string) The status of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- sslCertSerialNumber -- (unicode string) The serial number of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- sslCertBeginDate -- (date) The beginning date that the other broker's certificate is valid from. This field is only set if authProtocol is set to "SSL".
- sslCertEndDate -- (date) The end date to which the other broker's certificate is valid to. This field is only set if authProtocol is set to "SSL".
- gateway_pause --(boolean) state of the gateway (true - paused)
- gateway_pause_time -- (date) The time when the gateway was paused
- gateway_pause_client -- (string) The client id of the administrator who paused the gateway
- gateway_pause_session -- (integer) The session id that the gateway was paused from
- 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
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
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(String client_group_name, 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
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(String client_group_name, 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
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 indexmax_events
- - maximum number of events from the given indexmsecs
- - maximum amount of time that the events are peeked for in the queue.- Throws:
BrokerInvalidClientException
- - the admin client not connectedBrokerOutOfRangeException
- - from_index < 0BrokerNullParameterException
- - max_events, msecs = 0BrokerNullParameterException
- - if there are no logged eventsBrokerTimeoutException
- - reply from Broker is nullBrokerException
-
deleteLogEvents
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 indexnum_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
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
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 setfilter_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 otherBrokerException
-
setLogFilters
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 < 0BrokerException
-
setEventLogging
- Throws:
BrokerException
-
getEventLogging
- Overrides:
getEventLogging
in classBrokerClient
- Throws:
BrokerException
-
setTerritoryGatewayKeepAlive
public void setTerritoryGatewayKeepAlive(String territory_name, int KeepAlive) throws BrokerException Sets or disables KeepAlive interval on the gateway.- Parameters:
territory_name
- - name of the territoryKeepAlive
- - 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 nullBrokerOutOfRangeException
- if KeepALive is < 0BrokerException
-
getTerritoryGatewayKeepAlive
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 nullBrokerException
-
getStaticGatewayForwarding
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 nullBrokerException
-
setStaticGatewayForwarding
public void setStaticGatewayForwarding(String territory_name, boolean enable) throws BrokerException Enable or disable static gateway forwarding,- Parameters:
territory_name
- - name of the remote territoryenable
- - 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 nullBrokerException
-
checkAndRestartForwarding
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 nullBrokerException
-
checkAndRestartForwarding
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 nullBrokerException
-
setTerritoryGatewayPause
Pauses or resumes gateway- Parameters:
territory_name
- - name of the territorypause
- - 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 nullBrokerBadStateException
- If territory gateway is already paused or resumedBrokerNoPermissionException
- 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
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
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:
-
getPostPrepareTimeout
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
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:
-
setPostPrepareTimeoutAction
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
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:
-
getTransactions
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
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
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
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
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
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
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
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
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
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
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
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
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
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(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
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(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(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
Sets or disables KeepAlive interval for the remote broker.- Parameters:
broker_name
- - name of the brokerKeepAlive
- - 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 nullBrokerOutOfRangeException
- if KeepALive is < 0BrokerUnknownBrokerNameException
- if the broker_name cannot be foundBrokerNoPermissionException
- if the current client do not have permissionBrokerNotInTerritoryException
- if the broker do not belong to a territoryBrokerException
-
getRemoteBrokerKeepAlive
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 nullBrokerUnknownBrokerNameException
- if the broker_name cannot be foundBrokerNoPermissionException
- if the current client do not have permissionBrokerNotInTerritoryException
- if the broker do not belong to a territoryBrokerException
-
createCluster
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:
COM.activesw.api.client.BrokerInClusterException
- If the broker is already a member of a cluster.BrokerInvalidClientException
- If the client has been destroyed or disconnected.COM.activesw.api.client.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
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(String broker_host, 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.COM.activesw.api.client.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.COM.activesw.api.client.BrokerSSLClusterException
- If an error occurs during the SSL connection between the broker servers.BrokerException
-
removeBrokerFromCluster
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
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(String cluster_name, String broker_host, 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 clusterBrokerUnknownBrokerNameException
- If the specified broker does not exist.BrokerUnknownClusterException
- If the specified broker is not a member of the specified cluster.BrokerException
-
destroyClusterGateway
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(String cluster_name, String broker_name) throws BrokerException Get the cluster gateway statistics. Statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- remoteClusterName -- (unicode string) The name of the cluster.
- gatewayHost -- (unicode string) Gateway broker's host name.
- gatewayBrokerName -- (unicode string) Gateway broker's name.
- connectedFrom -- (unicode string) IP address where broker is currently connected from. "" if not connected.
- lastConnectTime -- (date) The time when the broker last connected. Forever (zero date and time) if never connected.
- numEventsForwarded -- (int) Number of events forwarded across the gateway.
- numEventsReceived -- (int) Number of events received across the gateway.
- lastEventForwardTime -- (date) Time when an event was last forwarded across the gateway. Forever (zero date and time) if never forwarded.
- lastEventReceiveTime -- (date) Time when an event was last received across the gateway. Forever (zero date and time) if never received.
- numEventsEnqueued -- (int) Number of events enqueued for the gateway.
- lastEventEnqueueTime -- (date) Time when an event was last enqueued for the gateway.
- queueLength -- (int) The current size (in number of events) of the gateway's queue.
- queueByteSize -- (int) The current size (in bytes) of the gateway's queue.
- queueHighestLength -- (int) The highest length (in number of events) of the gateway's queue.
- queueHighestLengthTime -- (date) Time when queueHighestLength was last changed.
- encryptProtocol -- (unicode string) The protocol being used for encryption to this broker. This field is set only if connectedFrom is not "" and if encryption is used. The only currently supported value is "SSL".
- encryptVersion -- (unicode string) The version of the encryption protocol. Not set if encryptProtocol is not set. Currently supported values are "SSLv2", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", and "TLSv1.3".
- encryptLevel -- (unicode string) The level of encryption being used to this broker. Not set if encryptProtocol is not set. Currently supported values are "USDomestic" and "USExport".
- authProtocol -- (unicode string) The protocol being used to authenticate the broker. This field is only set if connectedFrom is not "" and if authentication is used. The only currently supported value is "SSL".
- authVersion -- (unicode string) The version of the authentication protocol. Not set if authProtocol is not set. Currently supported values are "SSLv2", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", and "TLSv1.3".
- sslDistinguishedName -- (unicode string) The distinguished name of the other broker. This field is only set if authProtocol is set to "SSL".
- sslIssuerDistinguishedName -- (unicode string) The distinguished name of the issuer of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- sslCertStatus -- (unicode string) The status of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- sslCertSerialNumber -- (unicode string) The serial number of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- sslCertBeginDate -- (date) The beginning date that the other broker's certificate is valid from. This field is only set if authProtocol is set to "SSL".
- sslCertEndDate -- (date) The end date to which the other broker's certificate is valid to. This field is only set if authProtocol is set to "SSL".
- gateway_pause --(boolean) state of the gateway (true - paused)
- gateway_pause_time -- (date) The time when the gateway was paused
- gateway_pause_client -- (string) The client id of the administrator who paused the gateway
- gateway_pause_session -- (integer) The session id that the gateway was paused from
- 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
-
setClusterPrimaryGateway
public void setClusterPrimaryGateway(String cluster_name, 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(String cluster_name, 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
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(String cluster_name, 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
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(String cluster_name, 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
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 nullBrokerInvalidClientException
- 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(String cluster_name, String broker_name, int KeepAlive) throws BrokerException Sets or disables KeepAlive interval on the gateway.- Parameters:
cluster_name
- - name of the clusterbroker_name
- - name of the brokerKeepAlive
- - 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 nullBrokerOutOfRangeException
- if KeepALive is < 0BrokerNoPermissionException
- 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(String cluster_name, String broker_name, boolean pause) throws BrokerException Pauses or resumes a cluster gateway- Parameters:
cluster_name
- - name of the clusterbroker_name
- - name of the broker within this clusterpause
- - 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 nullBrokerBadStateException
- If cluster gateway is already paused or resumedBrokerNoPermissionException
- 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
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 nullBrokerException
-
setClusterStaticGatewayForwarding
public void setClusterStaticGatewayForwarding(String cluster_name, String broker_name, boolean enable) throws BrokerException Enable or disable static gateway forwarding,- Parameters:
cluster_name
- - name of the remote clusterbroker_name
- - name of the remote brokerenable
- - 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 nullBrokerException
-
getLocalClusterGateways
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
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
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
Get the cluster statistics. Statistics are set into a BrokerEvent as fields. The available values are:- now -- (date) Current time on the broker host.
- territoryName -- (unicode string) The name of the cluster.
- brokers -- (structure array) An array of structures describing statistics about other each broker in the cluster.
- brokers[].brokerHost -- (unicode string) Broker host name.
- brokers[].brokerName -- (unicode string) Broker name.
- brokers[].description -- (unicode string) Broker description.
- brokers[].connectedFrom -- (unicode string) IP address where broker is currently connected from. "" if not connected.
- brokers[].lastConnectTime -- (date) The time when the broker last connected. Forever (zero date and time) if never connected.
- brokers[].numEventsForwarded -- (int) Number of events forwarded to the broker.
- brokers[].numEventsReceived -- (int) Number of events received from the broker.
- brokers[].lastEventForwardTime -- (date) Time when an event was last forwarded to the broker. Forever (zero date and time) if never forwarded.
- brokers[].lastEventReceiveTime -- (date) Time when an event was last received from the broker. Forever (zero date and time) if never received.
- brokers[].numEventsEnqueued -- (int) Number of events enqueued for the broker.
- brokers[].lastEventEnqueueTime -- (date) Time when an event was last enqueued for the broker.
- brokers[].queueLength -- (long) The current size (in number of events) of the broker's queue.
- brokers[].queueByteSize -- (long) The current size (in bytes) of the broker's queue.
- brokers[].queueHighestLength -- (long) The highest length (in number of events) of the broker's queue.
- brokers[].queueHighestLengthTime -- (date) Time when queueHighestLength was last changed.
- brokers[].encryptProtocol -- (unicode string) The protocol being used for encryption to this broker. This field is set only if connectedFrom is not "" and if encryption is used. The only currently supported value is "SSL".
- brokers[].encryptVersion -- (unicode string) The version of the encryption protocol. Not set if encryptProtocol is not set. Currently supported values are "2" and "3".
- brokers[].encryptLevel -- (unicode string) The level of encryption being used to this broker. Not set if encryptProtocol is not set. Currently supported values are "USDomestic" and "USExport".
- brokers[].authProtocol -- (unicode string) The protocol being used to authenticate the broker. This field is only set if connectedFrom is not "" and if authentication is used. The only currently supported value is "SSL".
- brokers[].authVersion -- (unicode string) The version of the authentication protocol. Not set if authProtocol is not set. Currently supported values are "2" and "3".
- brokers[].sslDistinguishedName -- (unicode string) The distinguished name of the other broker. This field is only set if authProtocol is set to "SSL".
- brokers[].sslIssuerDistinguishedName -- (unicode string) The distinguished name of the issuer of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertStatus -- (unicode string) The status of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertSerialNumber -- (unicode string) The serial number of the other broker's certificate. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertBeginDate -- (date) The beginning date that the other broker's certificate is valid from. This field is only set if authProtocol is set to "SSL".
- brokers[].sslCertEndDate -- (date) The end date to which the other broker's certificate is valid to. This field is only set if authProtocol is set to "SSL".
- 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
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
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
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
-
getClientStatsById(java.lang.String)
,getClientStatsByIds(java.lang.String[])
Get All client's statistics.