Class BrokerAdminClient

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

public class BrokerAdminClient extends BrokerClient
Representation of an Information Broker administrative client.

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

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

  • Constructor Details

  • 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 permission
      BrokerNullParameterException - If client_group_name is null.
      BrokerOutOfRangeException - If the life cycle or storage type are not a valid values.
      BrokerException
    • destroyClientGroup

      public void destroyClientGroup(String client_group_name, boolean force_destroy) throws BrokerException
      Destroy the named client group. If the force_destroy flag is true, then any clients using the client group are destroyed. If the flag is false, then an error is returned if any clients exist which are members of the client group. Use getClientIdsByClientGroup() to get the list of clients using the client group.
      Throws:
      BrokerDependencyException - If force_destroy is false and there are clients which are members of the client group.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • getClientGroupNames

      public String[] getClientGroupNames() throws BrokerException
      Get the list of client group names from the broker. Only returns client groups which this client can browse. Clients can always browse their own client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerException
    • getClientGroupsWhichCanPublish

      public String[] getClientGroupsWhichCanPublish(String event_type_name) throws BrokerException
      Get the list of client groups which can publish the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If event_type_name is null.
      BrokerUnknownEventTypeException - If the event type does not exist on the broker.
      BrokerException
    • getClientGroupsWhichCanSubscribe

      public String[] getClientGroupsWhichCanSubscribe(String event_type_name) throws BrokerException
      Get the list of client groups which can subscribe the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If event_type_name is null.
      BrokerUnknownEventTypeException - If the event type does not exist on the broker.
      BrokerException
    • getClientGroupsWhichCanLogPublish

      public String[] getClientGroupsWhichCanLogPublish(String event_type_name) throws BrokerException
      Get the list of client groups which can log publish of the specified event type. Only returns client groups which this client can browse. Clients can always browse their own client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If event_type_name is null.
      BrokerUnknownEventTypeException - If the event type does not exist on the broker.
      BrokerException
    • getClientGroupsWhichCanLogAcknowledge

      public 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

      public BrokerClientGroupInfo getClientGroupInfo(String client_group_name) throws BrokerException
      Get the specified client group's information.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the specified client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • getClientGroupInfos

      public BrokerClientGroupInfo[] getClientGroupInfos(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

      public String[] getClientGroupCanPublishList(String client_group_name) throws BrokerException
      Get the list of event types the client group can publish or deliver.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • setClientGroupCanPublishList

      public void setClientGroupCanPublishList(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

      public String[] getClientGroupCanSubscribeList(String client_group_name) throws BrokerException
      Get the list of event types the client group can subscribe to or have delivered to it.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • setClientGroupCanSubscribeList

      public void setClientGroupCanSubscribeList(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

      public BrokerEvent getClientGroupStats(String client_group_name) throws BrokerException
      Get the specified client group's statistics. The statistics are set into a BrokerEvent as fields. The available values are:
      • 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

      public BrokerAccessControlList getClientGroupACL(String client_group_name) throws BrokerException
      Get the specified client group's access control list (ACL).
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to access security on the client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • setClientGroupACL

      public void setClientGroupACL(String client_group_name, BrokerAccessControlList acl) throws BrokerException
      Set the specified client group's access control list (ACL).
      Throws:
      BrokerInvalidAccessListException - If the access list is not valid.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to access security on the client group.
      BrokerNullParameterException - If client_group_name or acl are null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • getClientIds

      public String[] getClientIds() throws BrokerException
      Get the IDs of all the clients in the Broker. Only returns the IDs of clients which this client can browse. Clients can always browse their own client.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerException
    • getClientIdsByClientGroup

      public String[] getClientIdsByClientGroup(String client_group_name) throws BrokerException
      Get the IDs of all the clients in the Broker which are members of the specified client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse clients in the specified client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • getClientIdsWhichAreSubscribed

      public String[] getClientIdsWhichAreSubscribed(String event_type_name) throws BrokerException
      Get the IDs of all the clients in the Broker which are subscribed to the specified event type. Only returns the IDs of clients which this client can browse. Clients can always browse their own client.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If event_type_name is null.
      BrokerUnknownEventTypeException - If the event type does not exist on the broker.
      BrokerException
    • createClient

      public void createClient(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

      public void destroyClientById(String client_id) throws BrokerException
      Destroy the specified client.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • disconnectClientById

      public void disconnectClientById(String client_id) throws BrokerException
      Disconnect all sessions for the specified client.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • disconnectClientSessionById

      public void disconnectClientSessionById(String client_id, int session_id) throws BrokerException
      Disconnect the specified session for the specified client.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerUnknownSessionIdException - If the specified client session does not exist on the broker.
      BrokerException
    • getClientInfoById

      public BrokerClientInfo getClientInfoById(String client_id) throws BrokerException
      Get the specified client's information.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • getClientInfosById

      public BrokerClientInfo[] getClientInfosById(String[] client_ids) throws BrokerException
      Get the client information for the requested clients. If client_ids is null, gets the client info for all clients. Only returns information on clients which this client can browse. Clients can always browse their own client. The returned array is the same size as the client_ids array. Entries will be returned as null if they cannot be read because lack of permission to browse the client or because the client does not exist.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If an entry in client_ids is null.
      BrokerException
    • getClientInfosetById

      public BrokerEvent getClientInfosetById(String client_id) throws BrokerException
      Get the infoset for this client. The infoset is returned as an event object for convenience. In addition to the listed exceptions, any communications exception can be thrown.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • setClientInfosetById

      public void setClientInfosetById(String client_id, BrokerEvent infoset) throws BrokerException
      Set the infoset for a client. The infoset is passed as an event for convenience. In addition to the listed exceptions, any communications exception can be thrown.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidEventTypeNameException - If the event type name contains colons, which makes it an invalid infoset name.
      BrokerNoPermissionException - If the client does not have permission to modify the specified client.
      BrokerNullParameterException - If client_id or infoset are null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • getClientSubscriptionsById

      public BrokerSubscription[] getClientSubscriptionsById(String client_id) throws BrokerException
      Get the list of open subscriptions for a client.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • doesClientSubscriptionExistById

      public boolean doesClientSubscriptionExistById(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
    • setClientStateShareLimitById

      public void setClientStateShareLimitById(String client_id, int limit) throws BrokerException
      Set a client's state share limit. This is the number of clients which can be simultaneously connected using the client ID. Only usable on shared state clients. A value of BrokerClient.NO_SHARE_LIMIT (-1) means there is no limit. The current value can be acquiring using getClientInfoById().
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the specified client, or if the client is not a shared state client.
      BrokerNullParameterException - If client_id is null.
      BrokerOutOfRangeException - If limit is zero or less than -1.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • setClientLastPublishSequenceNumberById

      public void setClientLastPublishSequenceNumberById(String client_id, long seqn) throws BrokerException
      Set a client's high publisher sequence number. This is the sequnece i number of the most recently published event by the client, and is used to by the broker to discard duplicate events. The current value can be acquiring using getClientInfoById().
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the specified client, or if the client is not a shared state client.
      BrokerNullParameterException - If client_id is null.
      BrokerOutOfRangeException - If seqn is less than 0.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • clearClientQueueById

      public void clearClientQueueById(String client_id) throws BrokerException
      Clear all events from the client's queue. Use with caution.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to access events for the specified client.
      BrokerNullParameterException - If client_id is null.
      BrokerUnknownClientIdException - If the client does not exist on the broker.
      BrokerException
    • getClientStatsById

      public BrokerEvent getClientStatsById(String client_id) throws BrokerException
      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

      public BrokerEvent[] getClientStatsByIds(String[] client_ids) throws BrokerException
      Get statistics for the list of client IDs. The return value is array of BrokerEvent objects The statistics are set into a BrokerEvent as fields. The available values are:
      • 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 public BrokerAllQueueStat[] getAllQueueStats() throws BrokerException
      Deprecated.
      Deprecated in webMethods Broker 10.5, instead use getClientStatsById(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

      public void destroyEventType(String event_type_name, boolean force_destroy) throws BrokerException
      Destroy the named event type. If the force_destroy flag is true, then any client subscriptions using the event type are also destroyed, as are any can publish and can subscribe entries in client groups. If the flag is false, then an error is returned if any subscriptions exist which use the event type, or if any client group can publish or subscribe to the event type. Use getClientIdsWhichAreSubscribed(), getClientGroupsWhichCanPublish(), and getClientGroupsWhichCanSubscribe() to get the list of dependencies.
      Throws:
      BrokerDependencyException - If force_destroy is false and there are clients which have subscriptions to the event type, or client groups which have can publish or can subscribe permission to the event type.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the event type.
      BrokerNullParameterException - If event_type_name is null.
      BrokerUnknownEventTypeException - If the event type does not exist on the broker.
      BrokerException
    • destroyEventTypes

      public void destroyEventTypes(String[] event_type_names, boolean force_destroy) throws BrokerException
      Destroy the named event types. If the force_destroy flag is true, then any client subscriptions using the event types are also destroyed, as are any can publish and can subscribe entries in client groups. If the flag is false, then an error is returned if any subscriptions exist which use the event types, or if any client group can publish or subscribe to the event type. Use getClientIdsWhichAreSubscribed(), getClientGroupsWhichCanPublish(), and getClientGroupsWhichCanSubscribe() to get the list of dependencies. No error is returned if any of the listed event types do not exist.
      Throws:
      BrokerDependencyException - If force_destroy is false and there are clients which have subscriptions to the one or more of the event types, or client groups which have can publish or can subscribe permission to the event type. No events will be destroyed if this occurs.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify one or more of the event types. All the other event types are still destroyed.
      BrokerNullParameterException - If event_type_names is null, or any entry in the array is null.
      BrokerException
    • getEventAdminTypeDef

      public BrokerAdminTypeDef getEventAdminTypeDef(String event_type_name) throws BrokerException
      Get the specified event type's definition.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the event type. Note that all clients can browse event types which they can publish or subscribe to.
      BrokerNullParameterException - If event_type_name is null.
      BrokerUnknownEventTypeException - If the event type does not exist on the broker.
      BrokerException
    • getEventAdminTypeDefs

      public BrokerAdminTypeDef[] getEventAdminTypeDefs(String[] event_type_names) throws BrokerException
      Get the definitions for the requested event types. If event_type_names is null, gets definitions for all event types. Only returns the event types which this client can browse. Clients can always browse the event types which they can publish or subscribe to. The returned array is the same size as the event_type_names array. Entries will be returned as null if they cannot be read because of permission failure or because the event type does not exist.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If event_type_names is not null, but at least one entry in the array is null.
      BrokerException
    • getEventAdminTypeDefsByScope

      public BrokerAdminTypeDef[] getEventAdminTypeDefsByScope(String scope_name) throws BrokerException
      Get the definitions for the event types within the named scope. Only returns the event types which this client can browse. Clients can always browse the event types which they can publish or subscribe to.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If scope_name is null.
      BrokerUnknownEventTypeException - If no events exist in the specified scope on the broker.
      BrokerException
    • setEventAdminTypeDef

      public void setEventAdminTypeDef(BrokerAdminTypeDef type_def) throws BrokerException
      Set the specified event type's definition. If the type does not exist, this creates the event type.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the event type, or when creating an event type the permission to modify any event type.
      BrokerNullParameterException - If type_def is null.
      BrokerException
    • setEventAdminTypeDefs

      public void setEventAdminTypeDefs(BrokerAdminTypeDef[] type_defs) throws BrokerException
      Set the specified event type definitions. If the types do not exist, this creates the event types.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the event types, or when creating an event type the permission to modify any event type.
      BrokerNullParameterException - If type_defs is null, or if any entry in the array is null.
      BrokerException
    • getEventTypeStats

      public BrokerEvent getEventTypeStats(String event_type_name) throws BrokerException
      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

      public void destroyBroker() throws BrokerException
      Destroy this Broker. Also results in destroying this client.
      Throws:
      BrokerInTerritoryException - If the broker is in a territory with at least one other broker. It must leave the territory before being destroyed.
      BrokerInvalidClientException - If the client has been destroyed.
      BrokerNoPermissionException - If the client does not have permission to destroy the broker.
      BrokerException
    • getBrokerStats

      public BrokerEvent getBrokerStats() throws BrokerException
      Get the Broker statistics. Statistics are set into a BrokerEvent as fields. The available values are:
      • 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

      public String getBrokerDescription() throws BrokerException
      Get the broker description
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerException
    • setBrokerDescription

      public void setBrokerDescription(String description) throws BrokerException
      Set the broker description
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNullParameterException - If description is null.
      BrokerException
    • acquireChangeLock

      public BrokerChangeLockInfo acquireChangeLock() throws BrokerException
      Acquire the per-Broker change lock. If the lock is acquired, a BrokerChangeLockInfo object is returned with its "acquired" member set to true. If the lock is already held by a different client, the "acquired" member is set to false, and the client ID, session ID and the time of locking is returned in the BrokerChangeLockInfo object. Does not require any permissions. It is safe to call this method again after having acquired the lock.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerIncompatibleVersionException - If the broker does not support changelocks.
      BrokerException
    • releaseChangeLock

      public void releaseChangeLock() throws BrokerException
      Release the per-Broker change lock. An exception is returned if this client does not currently hold the change lock. Does not require any permissions.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerIncompatibleVersionException - If the broker does not support changelocks.
      BrokerBadStateException - If the change lock is not currently held or held by another client.
      BrokerException
    • getBrokersInTerritory

      public BrokerInfo[] getBrokersInTerritory() throws BrokerException
      Get the list of brokers in the territory, including this broker. This broker is always first in the list.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInTerritoryException - If the broker is not part of a territory.
      BrokerException
    • getTerritoryStats

      public BrokerEvent getTerritoryStats() throws BrokerException
      Get the territory statistics. Statistics are set into a BrokerEvent as fields. The available values are:
      • 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

      public void createTerritory(String territory_name) throws BrokerException
      Create a new territory with this broker as the first member. No warning will be issued if a territory already exists which has the same name.
      Throws:
      BrokerInTerritoryException - If the broker is already a member of a territory.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidTerritoryNameException - If the territory name is not valid.
      BrokerNoPermissionException - If the client does not have permission to modify the broker, or if the broker is not licensed for broker interconnection.
      BrokerNullParameterException - If territory_name is null.
      BrokerException
    • joinTerritory

      public BrokerJoinFailureInfo joinTerritory(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

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

      public void removeBrokerFromTerritory(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

      public BrokerTerritoryInfo getTerritoryInfo() throws BrokerException
      Get the territory's settings.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerException
    • setTerritorySecurity

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

      public BrokerAccessControlList getTerritoryACL() throws BrokerException
      Get the access control list (ACL) which brokers in the territory are using to accept connections from other brokers in their territory.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerException
    • setTerritoryACL

      public void setTerritoryACL(BrokerAccessControlList acl) throws BrokerException
      Set the access control list (ACL) which brokers in this territory will use to accept connections from other brokers in the territory. Changing the ACL will not cause existing inter-broker connections to fail. WARNING: May cause your territory to become partially disconnected if you disallow the user identity which a territory member is using to connect.
      Throws:
      BrokerInvalidAccessListException - If the access list is not valid.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If acl is null.
      BrokerException
    • createTerritoryGateway

      public void createTerritoryGateway(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

      public void destroyTerritoryGateway(String territory_name) throws BrokerException
      Destroy a gateway to the specified territory. Note that this only destroys one half of the gateway. A similar call must be made on the other broker to completely remove gateway. Until that is done, the gateway on the other broker will be in an incomplete status.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name is null.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerException
    • getLocalTerritoryGateways

      public BrokerTerritoryGatewayInfo[] getLocalTerritoryGateways() throws BrokerException
      Get the list of territories this broker is a gateway for.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerException
    • getAllTerritoryGateways

      public BrokerTerritoryGatewayInfo[] getAllTerritoryGateways() throws BrokerException
      Get the list of territories accessible from this broker either through local gateways or gateways from other brokers.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerException
    • setTerritoryGatewaySecurity

      public void setTerritoryGatewaySecurity(String territory_name, int auth_type, int encrypt_level) throws BrokerException
      Set the type of security used for the territory gateway. The current settings can be acquired using getLocalTerritoryGateways() or getAllTerritoryGateways(). The auth_type value can be any of the AUTH_TYPE_* values. The encrypt_level value can be any of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. Changing this value on a gateway can have major repercussions, so it should not be done lightly. It is recommended that the other broker be checked to make sure it is properly configured for the new mode prior to changing the mode. The change may take some time to take effect. WARNING: May cause your territory gateway to become disconnected if the other brokers is not properly configured for this connection type. For example, requring SSL authentication or encryption when the other broker is not configured for SSL.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name is null.
      BrokerOutOfRangeException - If auth_type or encrypt_level are not valid values.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerException
    • getTerritoryGatewayACL

      public BrokerAccessControlList getTerritoryGatewayACL(String territory_name) throws BrokerException
      Get the access control list (ACL) which this broker is using to accept connections from the other broker across the gateway. The ACL will either have zero entries if no checking is done, and one entry if checking is enabled.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name is null.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerException
    • setTerritoryGatewayACL

      public void setTerritoryGatewayACL(String territory_name, BrokerAccessControlList acl) throws BrokerException
      Set the access control list (ACL) which this broker will use to accept connections from the other broker across the gateway. Note that the ACL can only contain one entry (or no entries) in each of the user and authenticator lists. Changing the ACL will not cause an existing gateway connection to fail. WARNING: May cause your gateway to become disconnected if you disallow the user identity which the other broker is using to connect.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name or acl are null.
      BrokerOutOfRangeException - If the acl has more than one user entry or more than one auth entry in it.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerInvalidAccessListException - The DN access list contained invalid values.
      BrokerException
    • getTerritoryGatewayRefuseAllUpdates

      public boolean getTerritoryGatewayRefuseAllUpdates(String territory_name) throws BrokerException
      Returns whether a territory gateway refuses all updates.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name is null.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerException
    • setTerritoryGatewayRefuseAllUpdates

      public void setTerritoryGatewayRefuseAllUpdates(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
    • setTerritoryGatewayRefuseEventTypeUpdates

      public void setTerritoryGatewayRefuseEventTypeUpdates(String territory_name, BrokerSharedEventTypeRefuseUpdateInfo[] infos) throws BrokerException
      Sets which event types a territory gateway refuses updates for. The "refuse_events" field is ignored.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name is null.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerException
    • getTerritoryGatewaySharedEventTypes

      public BrokerSharedEventTypeInfo[] getTerritoryGatewaySharedEventTypes(String territory_name) throws BrokerException
      Get the information on event types shared across a territory gateway.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInTerritoryException - If the broker is not a member of a territory.
      BrokerNullParameterException - If territory_name is null.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory from this broker.
      BrokerException
    • setClusterGatewaySharedEventTypes

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

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

      public BrokerEvent getTerritoryGatewayStats(String territory_name) throws BrokerException
      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

      public BrokerTraceEvent[] getActivityTraces(int seqn, int msecs) throws BrokerException
      Get an array of broker activity traces. 'seqn' is zero on the first call and should be the value of 1 greater than the sequence number on the last element returned for future calls. Blocks for a given number of milliseconds then gives up. If 'msecs' is BrokerClient.TIME_INFINITE (-1), it waits forever. Note that if traces are not picked up regularly or if the broker is exceptionally busy, that some may be missed. Note that when using the automatic reconnect feature, you should reset your expected sequence number to zero again each time you are reconnected to the broker.
      Throws:
      BrokerInterruptedException - If this operation is interrupted.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to access diagnostics on the broker.
      BrokerTimeoutException - If no traces arrive before the specified number of milliseconds pass.
      BrokerException
    • getClientGroupLogPublishList

      public String[] getClientGroupLogPublishList(String client_group_name) throws BrokerException
      Get the list of event types that are logged when published or delivered by a client in the the specified client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • setClientGroupLogPublishList

      public void setClientGroupLogPublishList(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

      public String[] getClientGroupLogAcknowledgeList(String client_group_name) throws BrokerException
      Get the list of event types that are logged when they are acknowledged by a client in the the specified client group.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the client group.
      BrokerNullParameterException - If client_group_name is null.
      BrokerUnknownClientGroupException - If the client group does not exist on the broker.
      BrokerException
    • setClientGroupLogAcknowledgeList

      public void setClientGroupLogAcknowledgeList(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

      public BrokerEvent[] getLogEvents(int from_index, int max_events, int msecs) throws BrokerException
      Gets one or more events from the brokers event log at the given zero-based index. The number of events being returned is not guaranteed to be 'max_events' even if there are more than max_events in the client's queue. Any number of events up to the value of 'max_events' may be returned. In addition to the listed exceptions, any communications exception can be thrown. Throws an exception with the following major code setting: INVALID_CLIENT if the client is not valid. In addition, any of the communications errors can occur.
      Parameters:
      from_index - - return events starting from this zero-based index
      max_events - - maximum number of events from the given index
      msecs - - maximum amount of time that the events are peeked for in the queue.
      Throws:
      BrokerInvalidClientException - - the admin client not connected
      BrokerOutOfRangeException - - from_index < 0
      BrokerNullParameterException - - max_events, msecs = 0
      BrokerNullParameterException - - if there are no logged events
      BrokerTimeoutException - - reply from Broker is null
      BrokerException
    • deleteLogEvents

      public int deleteLogEvents(int from_index, int num_events) throws BrokerException
      Deletes one or more events from the broker's log. The number of events being deleted is not guaranteed to be 'num_events' Returns the number of events deleted
      Parameters:
      from_index - - events to be deleted starting from this index
      num_events - - number of events to be deleted
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if num_events are NULL.
      BrokerOutOfRangeException - if index is < 0 In addition, any of the communications errors can occur.
      BrokerException
    • getLogLength

      public int getLogLength() throws BrokerException
      Returns the number of events in the broker's log.
      Throws:
      BrokerInvalidClientException - if the client is not valid. In addition, any of the communications errors can occur.
      BrokerException
    • setLogFilter

      protected void setLogFilter(String event_name, String filter_expr) throws BrokerException
      Allows filtering of log content. If a filter is set on the broker's log then only those events that match the filter will be processed by log operations such as getLogEvent and deleteLogEvent This method can be called repeatedly with different event types to create a filter list. Each event type can have at most one filter. Passing in NULL values for both et_name and filter_expr will reset the filters on the log.
      Parameters:
      event_name - - event name on which the filter should be set
      filter_expr - - filter string to be set
      Throws:
      BrokerFailureException
      BrokerInvalidEventTypeNameException
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if events are NULL.
      BrokerOutOfRageException - if index or lock_id is < 0 (or) if lock is invalid (or) if lock is held by other
      BrokerException
    • setLogFilters

      protected void setLogFilters(BrokerFilter[] filters) throws BrokerException
      Allows filtering of log content. If a filter is set on the broker's log then only those events that match the filter will be processed by log operations such as getLogEvent and deleteLogEvent Only one filter per event type is permitted.
      Parameters:
      filters - - array of BrokerFilters that need to be set on events in the queue that has been locked.
      Throws:
      BrokerFailureException
      BrokerInvalidEventTypeNameException
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if events are NULL.
      BrokerOutOfRageException - if index is < 0
      BrokerException
    • setEventLogging

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

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

      public void setTerritoryGatewayKeepAlive(String territory_name, int KeepAlive) throws BrokerException
      Sets or disables KeepAlive interval on the gateway.
      Parameters:
      territory_name - - name of the territory
      KeepAlive - - interval in seconds to send keep alive messages. If zero, sending Keep Alive messages will be disabled
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if territory name is null
      BrokerOutOfRangeException - if KeepALive is < 0
      BrokerException
    • getTerritoryGatewayKeepAlive

      public int getTerritoryGatewayKeepAlive(String territory_name) throws BrokerException
      Returns KeepAlive interval on the gateway. Zero return value indicates sending Keep Alive events is disabled
      Parameters:
      territory_name - - name of the territory
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if territory name is null
      BrokerException
    • getStaticGatewayForwarding

      public boolean getStaticGatewayForwarding(String territory_name) throws BrokerException
      Get current static gateway forwarding status.
      Parameters:
      territory_name - name of the remote territory
      Returns:
      Returns true if the static gateway subscription is set on the given remote territory from the current broker. Returns false, if not set.
      Throws:
      BrokerInvalidClientException - If the client is not valid.
      BrokerNotInTerritoryException - If the broker is not part of a territory.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory.
      BrokerNullParameterException - if territory name is null
      BrokerException
    • setStaticGatewayForwarding

      public void setStaticGatewayForwarding(String territory_name, boolean enable) throws BrokerException
      Enable or disable static gateway forwarding,
      Parameters:
      territory_name - - name of the remote territory
      enable - - state of the static gateway subscription to set (true - enable, false - disable)
      Throws:
      BrokerNotInTerritoryException - If the broker is not part of a territory.
      BrokerUnknownTerritoryException - If there is no gateway to the specified territory.
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if territory name is null
      BrokerException
    • checkAndRestartForwarding

      public int checkAndRestartForwarding(String remote_broker_name) throws BrokerException
      Check for inactivity and restart forwarding documemnts across the specfied territory or gateway broker. Returns zero if the remote broker was restrted. otherwise returns a non-zero value.
      Parameters:
      remote_broker_name - - name of the remote broker
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if remote broker name is null
      BrokerException
    • checkAndRestartForwarding

      public int checkAndRestartForwarding() throws BrokerException
      Check for inactivity and restart forwarding documemnts on all territory and gateway brokers on this broker. Returns zero if no remote brokers was restrted. A non-zero return indicates the number of remote broker connections that were restarted.
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if remote broker name is null
      BrokerException
    • setTerritoryGatewayPause

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

      public int getPrePrepareTimeout() throws BrokerException
      Get the default pre-prepare timeout. This is the default timeout period between when a transaction is begun and before it is prepared.
      Returns:
      The default pre-prepare timeout in seconds.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
      See Also:
    • setPrePrepareTimeout

      public void setPrePrepareTimeout(int timeout_secs) throws BrokerException
      Set the default pre-prepare timeout. This is the default timeout period between when a transaction is begun and before it is prepared.
      Parameters:
      timeout_secs - The default pre-prepare timeout in seconds to set.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerOutOfRangeException - If the timeout value is invalid.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
      See Also:
    • getPostPrepareTimeout

      public int getPostPrepareTimeout() throws BrokerException
      Get the default post-prepare timeout. This is the default timeout period between when a transaction is prepared and before it is committed.
      Returns:
      The default post-prepare timeout in seconds.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
      See Also:
    • setPostPrepareTimeout

      public void setPostPrepareTimeout(int timeout_secs) throws BrokerException
      Set the default post-prepare timeout. This is the default timeout period between when a transaction is prepared and before it is committed.
      Parameters:
      timeout_secs - The post-prepare timeout in seconds to set.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerOutOfRangeException - If the timeout value is invalid.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
      See Also:
    • setPostPrepareTimeoutAction

      public void setPostPrepareTimeoutAction(int action) throws BrokerException
      Set the post-prepare timeout action. This is the action the Broker transaction manager will take when a prepared transaction times out.
      Parameters:
      action - Either BrokerAdminClient.TRANSACTION_ROLLBACK or BrokerAdminClient.TRANSACTION_COMMIT.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerOutOfRangeException - If the action is invalid.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
      See Also:
    • getPostPrepareTimeoutAction

      public int getPostPrepareTimeoutAction() throws BrokerException
      Get the post-prepare timeout action. This is the action the Broker transaction manager will take when a prepared transaction times out.
      Returns:
      The post-prepare timeout action.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
      See Also:
    • getTransactions

      public BrokerEvent getTransactions() throws BrokerException
      Get the list of current transactions in the Broker transaction manager. The transaction information is stored in a Broker event as follows:
         transaction context info {
           date now;
           struct {
             long          transactionId;
             UnicodeString externalId;
             UnicodeString clientId;
             int           sessionId;
             int           state;
             date          createdTime;
             date          endedTime;
             date          preparedTime;
             date          closedTime;
             int           closedReason;
             date          unpreparedTimeout;
             int           preparedTimeoutInterval;
             date          preparedTimeout;
             int           numEventsReceived;
             int           numEventsAcknowledged;
             int           numEventsPublished;
           } transactions[];
         }
       
      Returns:
      A Broker event containing information on all of the current transactions.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • getTransactionsByClient

      public BrokerEvent getTransactionsByClient(String client_id) throws BrokerException
      Get the list of a client's transactions in the Broker transaction manager. The transaction information is stored in a Broker event as follows:
         transaction context info {
           date now;
           struct {
             long          transactionId;
             UnicodeString externalId;
             UnicodeString clientId;
             int           sessionId;
             int           state;
             date          createdTime;
             date          endedTime;
             date          preparedTime;
             date          closedTime;
             int           closedReason;
             date          unpreparedTimeout;
             int           preparedTimeoutInterval;
             date          preparedTimeout;
             int           numEventsReceived;
             int           numEventsAcknowledged;
             int           numEventsPublished;
           } transactions[];
         }
       
      Returns:
      A Broker event containing information on all of the client's transactions.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidClientIdException - If the client_id contains illegal characters.
      BrokerNullParameterException - If the client_id is null.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • getHeuristicTransactions

      public BrokerEvent getHeuristicTransactions() throws BrokerException
      Get the list of heuristic transactions in the Broker transaction manager. The transaction information is stored in a Broker event as follows:
         transaction context info {
           date now;
           struct {
             long          transactionId;
             UnicodeString externalId;
             UnicodeString clientId;
             int           sessionId;
             int           state;
             date          createdTime;
             date          endedTime;
             date          preparedTime;
             date          closedTime;
             int           closedReason;
             date          unpreparedTimeout;
             int           preparedTimeoutInterval;
             date          preparedTimeout;
             int           numEventsReceived;
             int           numEventsAcknowledged;
             int           numEventsPublished;
           } transactions[];
         }
       
      Returns:
      A Broker event containing information on all of the heuristic transactions.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • commitForced

      public void commitForced(long tx_id) throws BrokerException
      Forcibly commit a transaction.
      Parameters:
      tx_id - The Broker transaction context to commit.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidTxException - If the transaction does not exist or the transaction state does not allow it to be committed.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • commitForced

      public void commitForced(long[] tx_ids) throws BrokerException
      Forcibly commit a list of transactions.
      Parameters:
      tx_ids - A list of Broker transaction contexts to commit.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidTxException - If one or more transactions do not exist or the transaction state does not allow it to be committed.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • abortForced

      public void abortForced(long tx_id) throws BrokerException
      Forcibly abort a transaction.
      Parameters:
      tx_id - The Broker transaction context to abort.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidTxException - If the transaction does not exist or the transaction state does not allow it to be aborted.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • abortForced

      public void abortForced(long[] tx_ids) throws BrokerException
      Forcibly abort a list of transactions.
      Parameters:
      tx_ids - A list of Broker transaction contexts to abort.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If tx_ids is null.
      BrokerInvalidTxException - If one or more transactions do not exist or the transaction state does not allow it to be aborted.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • forgetForced

      public void forgetForced(long tx_id) throws BrokerException
      Forcibly purge a heuristic transaction.
      Parameters:
      tx_id - The Broker transaction context to purge.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerInvalidTxException - If the transaction does not exist.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • forgetForced

      public void forgetForced(long[] tx_ids) throws BrokerException
      Forcibly purge a list of heuristic transactions.
      Parameters:
      tx_ids - A list of Broker transaction contexts to purge.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNullParameterException - If tx_ids is null.
      BrokerInvalidTxException - If one or more transactions do not exist.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • forgetForced

      public void forgetForced() throws BrokerException
      Forcibly purge all heuristic transactions.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerIncompatibleVersionException - If the broker does not support transaction administration.
      BrokerException
    • setRecoverMode

      public void setRecoverMode(int mode) throws BrokerException
      Sets the global recover mode to either restricted (the default) or global. Restricted mode only allows a client to recover transactions to which it participated. Global mode allows a client to recover all recoverable transactions.
      Parameters:
      mode - The recover mode to set, either RECOVER_GLOBAL or RECOVER_RESTRICTED.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerOutOfRangeException - If the recovery mode is invalid.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerException
    • getRecoverMode

      public int getRecoverMode() throws BrokerException
      Gets the global recover mode.
      Returns:
      The recover mode.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have sufficient permissions.
      BrokerException
    • transactionStateToString

      public static String transactionStateToString(int state)
      Returns a String object representing the specified Broker Transaction Manager's transaction state.
      Parameters:
      state - The Broker Transaction Manager's transaction state to be converted.
      Returns:
      The string representation of the specified state.
    • createClientQueueBrowser

      public BrokerClientQueueBrowser createClientQueueBrowser(String client_id) throws BrokerException
      Creates a queue browser on the specified client. This queue browser can be used to browse events from the client's queue without holding queue lock. Since the queue is not locked, the queue content may change between operations on this browser.
      Parameters:
      client_id - The client on which the queue browser is requested.
      Returns:
      BrokerClientQueueBrowser object.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerUnknownClientIdException - If the client id specified does not exist on the broker.
      BrokerException
    • createLockedClientQueueBrowser

      public BrokerLockedClientQueueBrowser createLockedClientQueueBrowser(String client_id) throws BrokerException
      Creates a locked queue browser on the specified client. The client queue is locked for the entire duration of this browser existence.
      Parameters:
      client_id - The client on which the queue browser is requested.
      Returns:
      BrokerLockedClientQueueBrowser object.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerUnknownClientIdException - If the client id specified does not exist on the broker.
      BrokerClientQueueBrowserException - If the specified client queue is locked by some other queue browser.
      BrokerException
    • createForwardQueueBrowser

      public BrokerQueueBrowser createForwardQueueBrowser(String remoteBroker) throws BrokerException
      Creates a queue browser on the forwarding queue of the specified remote broker. This queue browser can be used to browse events from the forward queue without holding queue lock. Since the queue is not locked, the queue content may change between operations on this browser.
      Parameters:
      remoteBroker - The name of the remote broker for which the forward queue browser is requested.
      Returns:
      BrokerQueueBrowser object.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerQueueBrowserException - If the forward queue for the remote broker specified does not exist on the broker.
      BrokerIncompatibleVersionException - If the broker does not support forwad queue browsing.
      BrokerException
    • createLockedForwardQueueBrowser

      public BrokerLockedQueueBrowser createLockedForwardQueueBrowser(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

      public void setRemoteBrokerKeepAlive(String broker_name, int KeepAlive) throws BrokerException
      Sets or disables KeepAlive interval for the remote broker.
      Parameters:
      broker_name - - name of the broker
      KeepAlive - - interval in seconds to send keep alive messages. If zero, sending Keep Alive messages will be disabled
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if broker name is null
      BrokerOutOfRangeException - if KeepALive is < 0
      BrokerUnknownBrokerNameException - if the broker_name cannot be found
      BrokerNoPermissionException - if the current client do not have permission
      BrokerNotInTerritoryException - if the broker do not belong to a territory
      BrokerException
    • getRemoteBrokerKeepAlive

      public int getRemoteBrokerKeepAlive(String broker_name) throws BrokerException
      Returns KeepAlive interval for a remote broker. Zero return value indicates sending Keep Alive events is disabled
      Parameters:
      broker_name - - name of the remote broker
      Throws:
      BrokerInvalidClientException - if the client is not valid.
      BrokerNullParameterException - if the broker name is null
      BrokerUnknownBrokerNameException - if the broker_name cannot be found
      BrokerNoPermissionException - if the current client do not have permission
      BrokerNotInTerritoryException - if the broker do not belong to a territory
      BrokerException
    • createCluster

      public void createCluster(String clusterName) throws BrokerException
      Create a new cluster with this broker as the first member. No warning will be issued if a cluster already exists which has the same name.
      Throws:
      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

      public BrokerClusterInfo getClusterInfo() throws BrokerException
      Get the cluster's settings.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerException
    • addBrokerToCluster

      public BrokerJoinFailureInfo addBrokerToCluster(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

      public void removeBrokerFromCluster(String broker_host, String broker_name) throws BrokerException
      Force the removal of a given broker from the cluster. This operation will return as soon as this broker has started the removal of the specified broker from the cluster. It may return before other members of the cluster are notified of this removal.
      Throws:
      BrokerHostNotFoundException - If the specified host does not exist.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerNullParameterException - If broker_host or broker_name are null.
      BrokerOutOfRangeException - If attempt to remove the current broker.
      BrokerUnknownBrokerNameException - If the specified broker on the specified host is not a member of the cluster.
      BrokerException
    • leaveCluster

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

      public void createClusterGateway(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 cluster
      BrokerUnknownBrokerNameException - If the specified broker does not exist.
      BrokerUnknownClusterException - If the specified broker is not a member of the specified cluster.
      BrokerException
    • destroyClusterGateway

      public void destroyClusterGateway(String cluster_name, String broker_name) throws BrokerException
      Destroy a gateway to the specified cluster. Note that this only destroys one half of the gateway. A similar call must be made on the other broker to completely remove gateway. Until that is done, the gateway on the other broker will be in an incomplete status.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerNullParameterException - If cluster_name is null.
      BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
      BrokerException
    • getClusterGatewayStats

      public BrokerEvent getClusterGatewayStats(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
    • getClusterGatewaySharedEventTypes

      public BrokerSharedEventTypeInfo[] getClusterGatewaySharedEventTypes(String cluster_name, String broker_name) throws BrokerException
      Get the information on event types shared across a cluster gateway.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerNullParameterException - If cluster_name is null.
      BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
      BrokerException
    • setClusterPrimaryGateway

      public void setClusterPrimaryGateway(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

      public BrokerAccessControlList getClusterGatewayACL(String cluster_name) throws BrokerException
      Get the access control list (ACL) which this broker is using to accept connections from the other broker across the gateway. The ACL will either have zero entries if no checking is done, and one entry if checking is enabled.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerNullParameterException - If cluster_name is null.
      BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
      BrokerException
    • setClusterGatewayACL

      public void setClusterGatewayACL(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

      public boolean getClusterGatewayRefuseAllUpdates(String cluster_name) throws BrokerException
      Returns whether a cluster gateway refuses all updates.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerNullParameterException - If cluster_name is null.
      BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
      BrokerException
    • setClusterGatewayRefuseAllUpdates

      public void setClusterGatewayRefuseAllUpdates(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

      public int getClusterGatewayKeepAlive(String cluster_name) throws BrokerException
      Returns KeepAlive interval on the gateway. Zero return value indicates sending Keep Alive events is disabled
      Parameters:
      cluster_name - - name of the cluster
      Throws:
      BrokerNullParameterException - if cluster name is null
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerUnknownClusterException - If there is no gateway to the specified cluster from this broker.
      BrokerException
    • setClusterGatewayKeepAlive

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

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

      public boolean getClusterStaticGatewayForwarding(String cluster_name) throws BrokerException
      Get current static gateway forwarding status.
      Parameters:
      cluster_name - Name of the remote cluster.
      Returns:
      Returns true if the static gateway subscription is set on the given remote cluster from the current broker. Returns false, if not set.
      Throws:
      BrokerInvalidClientException - If the client is not valid.
      BrokerNotInClusterException - If the broker is not part of a cluster.
      BrokerUnknownClusterException - If there is no gateway to the specified cluster.
      BrokerNullParameterException - If cluster name is null
      BrokerException
    • setClusterStaticGatewayForwarding

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

      public BrokerClusterGatewayInfo[] getLocalClusterGateways() throws BrokerException
      Get the list of clusters this broker is a gateway for.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerException
    • getAllClusterGateways

      public BrokerClusterGatewayInfo[] getAllClusterGateways() throws BrokerException
      Get the list of clusters accessible from this broker either through local gateways or gateways from other brokers.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerException
    • getBrokersInCluster

      public BrokerInfo[] getBrokersInCluster() throws BrokerException
      Get the list of brokers in the cluster, including this broker. This broker is always first in the list.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInClusterException - If the broker is not part of a cluster.
      BrokerException
    • getClusterStats

      public BrokerEvent getClusterStats() throws BrokerException
      Get the cluster statistics. Statistics are set into a BrokerEvent as fields. The available values are:
      • 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

      public BrokerAccessControlList getClusterACL() throws BrokerException
      Get the access control list (ACL) which brokers in the cluster are using to accept connections from other brokers in their cluster.
      Throws:
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to browse the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerSecurityException - If secure sockets are not supported or are not enabled on the Broker.
      BrokerException
    • setClusterACL

      public void setClusterACL(BrokerAccessControlList acl) throws BrokerException
      Set the access control list (ACL) which brokers in this cluster will use to accept connections from other brokers in the cluster. Changing the ACL will not cause existing inter-broker connections to fail. WARNING: May cause your cluster to become partially disconnected if you disallow the user identity which a cluster member is using to connect.
      Throws:
      BrokerInvalidAccessListException - If the access list is not valid.
      BrokerInvalidClientException - If the client has been destroyed or disconnected.
      BrokerNoPermissionException - If the client does not have permission to modify the broker.
      BrokerNotInClusterException - If the broker is not a member of a cluster.
      BrokerNullParameterException - If acl is null.
      BrokerException
    • setClusterSecurity

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