Class BrokerCompleteBroker
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
deepRefresh
(BrokerAdminClient client) Refreshes the information about a Broker based on the given client.static BrokerCompleteBroker
deepRetrieve
(BrokerAdminClient client) Retrieves the information about a Broker based on the given client.void
deepStore
(BrokerAdminClient client) Stores the information from this object into the Broker for which the given client object has been provided.void
refresh
(BrokerAdminClient client) Refreshes the information about a Broker based on the given client.void
Refreshes only information about a Broker's territory and gateways.static BrokerCompleteBroker
retrieve
(BrokerAdminClient client) Retrieves the information about a Broker based on the given client.void
store
(BrokerAdminClient client) Stores the information from this object into the Broker for which the given client object has been provided.toString()
Converts this broker's information into a string.toString
(int indent_level) Converts this broker's information into a string.void
Writes this broker's information out in a textual format.
-
Field Details
-
broker_name
-
description
-
is_default
public boolean is_default -
clients
-
client_groups
-
event_types
-
territory
-
territory_gateways
-
-
Constructor Details
-
BrokerCompleteBroker
public BrokerCompleteBroker()Constructor. -
BrokerCompleteBroker
Constructor. Sets fields using the BrokerInfo.- Throws:
BrokerNullParameterException
- If info is null.BrokerException
-
-
Method Details
-
retrieve
Retrieves the information about a Broker based on the given client. Does not determine whether it is the default broker on its host.The default broker status is determined from the broker's host if this BrokerCompleteBroker instance was created by a BrokerCompleteServer or BrokerCompleteCollection method.
Does NOT retrieve any information about Client Groups, Event Types, Territories, or Territory Gateways.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
deepRetrieve
Retrieves the information about a Broker based on the given client. Does not determine whether it is the default broker on its host.The default broker status is determined from the broker's host if this BrokerCompleteBroker instance was created by a BrokerCompleteServer or BrokerCompleteCollection method.
Retrieves the information about Client Groups, Event Types, Territories, and Territory Gateways as defined by BrokerCompleteClientGroup.retrieve() and BrokerCompleteEventType.retrieve(). BrokerCompleteTerritory.retrieve(). BrokerCompleteTerritoryGateway. retrieve().
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
refresh
Refreshes the information about a Broker based on the given client. Does not determine whether it is the default broker on its host.The default broker status is determined from the broker's host if this BrokerCompleteBroker instance was created by a BrokerCompleteServer or BrokerCompleteCollection method.
Does NOT refresh any information about Client Groups, Event Types, Territories, or Territory Gateways.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
deepRefresh
Refreshes the information about a Broker based on the given client. Does not determine whether it is the default broker on its host.The default broker status is determined from the broker's host if this BrokerCompleteBroker instance was created by a BrokerCompleteServer or BrokerCompleteCollection method.
Refreshes the information about Client Groups, Event Types, Territories, and Territory Gateways as defined by BrokerCompleteClientGroup.refresh() and BrokerCompleteEventType.refresh(). BrokerCompleteTerritoryGateway.refresh().
Any Client Groups, Event Types, Territory, or Territory Gateways which no longer exist, or for which this client does not have permission to read are removed from this object.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
refreshTerritoryAndGateways
Refreshes only information about a Broker's territory and gateways.Any Territory, or Territory Gateways which no longer exist are removed from this object.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
store
Stores the information from this object into the Broker for which the given client object has been provided.The broker name in this object and whether or not it is the default are ignored. Other values may be overwritten or merged.
- If the description is set, it replaces the existing value. created.
If an exception is thrown, nothing is changed.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerNoPermissionException
- If the client does not have permission to change the specified information.BrokerException
-
deepStore
Stores the information from this object into the Broker for which the given client object has been provided.The broker name in this object and whether or not it is the default are ignored. Other values may be overwritten or merged.
- If the description is set, it replaces the existing value.
After the Client Groups and Event Types are stored, the Broker will create a Territory or join one if the territory member is set. If the territory_gateway member is non-null a territory gateway will be created.
If an exception is thrown, nothing is changed.
- Throws:
BrokerInvalidAccessListException
- If the access list is not valid.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerInvalidClientGroupNameException
- If a client group has an invalid name.BrokerInvalidEventTypeNameException
- If an invalid event type name is specified to be created.BrokerNoPermissionException
- If the client does not have permission to change the specified information.BrokerNullParameterException
- If client 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 a client group contains an invalid value for its life cycle or storage type.BrokerUnknownEventTypeException
- If a client group contains a "can publish" or "can subscribe" list with an event type which does not exist on the broker.BrokerException
-
write
Writes this broker'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 broker_name 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 broker's information into a string. The indent_level is the number of 4 character indents to use. 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.
- Throws:
BrokerOutOfRangeException
- If indent_level is less than 0.BrokerException
-
toString
Converts this broker'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.
-