Class BrokerCompleteClientGroup

java.lang.Object
COM.activesw.api.client.BrokerCompleteClientGroup

public class BrokerCompleteClientGroup extends Object
Holds all of the information describing a client groups as far as import and export are concerned.
  • Field Details

    • 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 String[] can_publish
    • can_subscribe

      public String[] can_subscribe
    • log_publish

      public String[] log_publish
    • log_acknowledge

      public String[] log_acknowledge
    • acl

  • Constructor Details

    • BrokerCompleteClientGroup

      public BrokerCompleteClientGroup()
      Constructor.
    • BrokerCompleteClientGroup

      public BrokerCompleteClientGroup(BrokerClientGroupInfo info)
      Constructor. Sets the BrokerClientGroupInfo.
  • Method Details

    • retrieve

      public static BrokerCompleteClientGroup retrieve(BrokerAdminClient client, 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(Writer writer, int indent_level) throws BrokerException, 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:
      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 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 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 class Object