Class BrokerCompleteClientGroup
- java.lang.Object
-
- COM.activesw.api.client.BrokerCompleteClientGroup
-
public class BrokerCompleteClientGroup extends java.lang.Object
Holds all of the information describing a client groups as far as import and export are concerned.
-
-
Field Summary
Fields Modifier and Type Field Description BrokerAccessControlList
acl
java.lang.String[]
can_publish
java.lang.String[]
can_subscribe
BrokerClientGroupInfo
client_group_info
boolean
ignore_change_errors_on_store
java.lang.String[]
log_acknowledge
java.lang.String[]
log_publish
boolean
replace_lists_on_store
-
Constructor Summary
Constructors Constructor Description BrokerCompleteClientGroup()
Constructor.BrokerCompleteClientGroup(BrokerClientGroupInfo info)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
refresh(BrokerAdminClient client)
Refreshes the information about the Client Group using the given client.static BrokerCompleteClientGroup
retrieve(BrokerAdminClient client, java.lang.String client_group_name)
Retrieves the information about the specified Client Group with the given client.void
store(BrokerAdminClient client)
Stores the information from this Client Group into the broker for which the given client object has been provided.java.lang.String
toString()
Converts this Client Group's information into a string.java.lang.String
toString(int indent_level)
Converts this Client Group's information into a string.void
write(java.io.Writer writer, int indent_level)
Writes this Client Group's information out in a textual format.
-
-
-
Field Detail
-
client_group_info
public BrokerClientGroupInfo client_group_info
-
ignore_change_errors_on_store
public boolean ignore_change_errors_on_store
-
replace_lists_on_store
public boolean replace_lists_on_store
-
can_publish
public java.lang.String[] can_publish
-
can_subscribe
public java.lang.String[] can_subscribe
-
log_publish
public java.lang.String[] log_publish
-
log_acknowledge
public java.lang.String[] log_acknowledge
-
acl
public BrokerAccessControlList acl
-
-
Constructor Detail
-
BrokerCompleteClientGroup
public BrokerCompleteClientGroup()
Constructor.
-
BrokerCompleteClientGroup
public BrokerCompleteClientGroup(BrokerClientGroupInfo info)
Constructor. Sets the BrokerClientGroupInfo.
-
-
Method Detail
-
retrieve
public static BrokerCompleteClientGroup retrieve(BrokerAdminClient client, java.lang.String client_group_name) throws BrokerException
Retrieves the information about the specified Client Group with the given client.Inability to access the access control list does not cause a permission exception. The value of 'acl' is set to null.
- Throws:
BrokerNullParameterException
- If client or client_group_name is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerNoPermissionException
- If the client does not have permission to read the specified information.BrokerUnknownClientGroupException
- If the client group does not exist on the broker.BrokerException
-
refresh
public void refresh(BrokerAdminClient client) throws BrokerException
Refreshes the information about the Client Group using the given client. Requires that 'client_group_info.name' be set to the Client Group name.Inability to access the access control list does not cause a permission exception. The value of 'acl' is set to null.
- Throws:
BrokerNullParameterException
- If the client parameter is null or the instance variable client_group_info or client_group_info.name are null.BrokerInvalidClientGroupNameException
- If the client group name in client_group_info.name is not valid.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerNoPermissionException
- If the client does not have permission to read the specified information.BrokerUnknownClientGroupException
- If the client group does not exist on the broker.BrokerException
-
store
public void store(BrokerAdminClient client) throws BrokerException
Stores the information from this Client Group into the broker for which the given client object has been provided.If the Client Group does not exist, the Client Group is created and initialized with whatever information is set in this object.
If the Client Group does exist, then some items are overwritten and some are merged.
- The life cycle and storage type values that differ from the existing value will generate an error unless 'ignore_change_errors_on_store' is true. These values can only be set when creating the Client Group.
- If the description is set, it replaces the existing one.
- If the 'can_publish' and/or 'can_subscribe', 'log_publish', 'log_acknowledge' lists are set, they are merged with the existing lists. If the replace_lists_on_store flag is true, these lists overwrite the current values.
- If the access control list is set, it replaces the existing one.
If the client group is system-defined, any attempt to change the life cycle, storage type, or description will generate an error unless 'ignore_change_errors_on_store' is true.
If any exception is thrown, nothing is changed on the broker.
- Throws:
BrokerInvalidAccessListException
- If the access list is not valid.BrokerNullParameterException
- If the client parameter is null or the instance variable client_group_info or client_group_info.name are null.BrokerInvalidClientGroupNameException
- If the client group name in client_group_info.name is not valid.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerNoPermissionException
- If the client does not have permission to change the specified information.BrokerOutOfRangeException
- If the life cycle, storage type, or required encryption level are not valid values.BrokerUnknownEventTypeException
- If an event type in the can_publish or can_subscribe lists 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 Group'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_group_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 Group'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 Group'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 classjava.lang.Object
-
-