Class BrokerCompleteClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
refresh
(BrokerAdminClient client) Refreshes the information about the Client using the given broker admin client.static BrokerCompleteClient
retrieve
(BrokerAdminClient client, String client_id) Retrieves the information about the specified Client with the given broker admin client.void
store
(BrokerAdminClient client) Stores the information from this Client into the broker for which the given broker admin client has been provided.toString()
Converts this Client's information into a string.toString
(int indent_level) Converts this Client's information into a string.void
Writes this Client's information out in a textual format.
-
Field Details
-
client_info
-
replace_subscriptions_on_store
public boolean replace_subscriptions_on_store -
subscriptions
-
infoset
-
-
Constructor Details
-
BrokerCompleteClient
public BrokerCompleteClient()Constructor. -
BrokerCompleteClient
Constructor. Sets the BrokerClientInfo.
-
-
Method Details
-
retrieve
public static BrokerCompleteClient retrieve(BrokerAdminClient client, String client_id) throws BrokerException Retrieves the information about the specified Client with the given broker admin client.- Throws:
BrokerNullParameterException
- If client or client_id 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.BrokerException
-
refresh
Refreshes the information about the Client using the given broker admin client. Requires that 'client_info.client_id' be set to the Client's id.- Throws:
BrokerNullParameterException
- If the client parameter is null or the instance variable client_info or client_info.client_id are 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.BrokerException
-
store
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
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:
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
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
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.
-