Class BrokerCompleteClient


  • public class BrokerCompleteClient
    extends java.lang.Object
    Holds all of the information describing a client as far as import and export are concerned.
    • Constructor Detail

      • BrokerCompleteClient

        public BrokerCompleteClient()
        Constructor.
      • BrokerCompleteClient

        public BrokerCompleteClient​(BrokerClientInfo info)
        Constructor. Sets the BrokerClientInfo.
    • Method Detail

      • store

        public void store​(BrokerAdminClient client)
                   throws BrokerException
        Stores the information from this Client into the broker for which the given broker admin client has been provided.

        Nothing will happen within this function if the Client is not a member of a Client Group with an Explicit Destroy lifecycle.

        If the Client does not exist the Client is created and initialized with whatever information is set in this object.

        If the Client does exist, then some items are overwritten and some are merged.

        • The app_name, client_group, can_share_state, shared_event_ordering, user_name and authenticator_name fields in the client_info object are ignored if the client already exists. These values are only set when creating the Client.
        • The access_label field in the client_info object is always ignored.
        • The high_pub_seqn field in the client_info object is set if the value is greater than or equal to zero.
        • If the state_share_limit in the client_info object is non-zero and the can_share_state flag is true in the existing or new client, the state_share_limit will be set with the new value.
        • If the subscriptions list is set it is merged with any existing subscriptions. If the replace_subscriptions_on_store flag is true, this list overwrites the current one.
        • If the infoset is set, it replaces the existing one.

        If any exception is thrown, nothing is changed on the broker.

        Throws:
        BrokerNullParameterException - If the client parameter is null or the instance variable client_info or client_info.client_id are null or the an elements in the subscription array are null or any event_type_name in any of the subscriptions is null.
        BrokerInvalidClientException - If broker admin client has been destroyed or disconnected.
        BrokerNoPermissionException - If the broker admin client does not have permission to read the specified information.
        BrokerUnknownClientIdException - If the client id does not exist on the broker.
        BrokerOutOfRangeException - If any subcription element's sub_id is less than zero, or the state_share_limit is less than -1.
        BrokerUnknownEventTypeException - If the event type name listed in one of the subscriptions does not exist on the broker. All other subscriptions are created if this error occurs.
        BrokerInvalidSubscriptionException - If the filter string in any subscription contains a parse error. All other subscriptions are created if this error occurs.
        BrokerUnknownClientGroupException - If the client group in client_info.client_group does not exist on the broker.
        BrokerException
      • write

        public void write​(java.io.Writer writer,
                          int indent_level)
                   throws BrokerException,
                          java.io.IOException
        Writes this Client's information out in a textual format. This is usually done to a file. The indent_level is the number of 4 character indents to use.

        Unicode characters in the output are escaped using backslash-u notiation (e.g. ӿ).

        Does not write anything if 'client_info' is null.

        Throws:
        java.io.IOException - If there is an error wrtiting to the file.
        BrokerNullParameterException - If writer is null.
        BrokerOutOfRangeException - If indent_level is less than 0.
        BrokerException
      • toString

        public java.lang.String toString​(int indent_level)
                                  throws BrokerException
        Converts this Client's information into a string. The string is in proper format for saving to a file. The indent_level is the number of 4 character indents to use.

        Unicode characters in the output are escaped using backslash-u notiation (e.g. ӿ).

        Returns an empty string if all of the data members are null, or if all of them return empty strings when converted to strings.

        Throws:
        BrokerOutOfRangeException - If indent_level is less than 0.
        BrokerException
      • toString

        public java.lang.String toString()
        Converts this Client's information into a string. The string is in proper format for saving to a file.

        Unicode characters in the output are escaped using backslash-u notiation (e.g. ӿ).

        Returns an empty string if all of the data members are null, or if all of them return empty strings when converted to strings.

        Overrides:
        toString in class java.lang.Object