Package COM.activesw.api.client
Class BrokerCompleteTerritory
- java.lang.Object
-
- COM.activesw.api.client.BrokerCompleteTerritory
-
public class BrokerCompleteTerritory extends java.lang.Object
Holds all of the information describing a broker as far as import and export are concerned.
-
-
Field Summary
Fields Modifier and Type Field Description BrokerAccessControlList
acl
BrokerTerritoryInfo
info
BrokerInfo[]
other_brokers_in_territory
-
Constructor Summary
Constructors Constructor Description BrokerCompleteTerritory()
Constructor.BrokerCompleteTerritory(BrokerTerritoryInfo 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 a Territory based on the given broker admin client.static BrokerCompleteTerritory
retrieve(BrokerAdminClient client)
Retrieves the information about a Territory based on the given broker admin client.void
store(BrokerAdminClient client)
Stores the information from this Territory into the broker for which the given client object has been provided.java.lang.String
toString()
Converts this Territory's information into a string.java.lang.String
toString(int indent_level)
Converts this Territory's information into a string.void
write(java.io.Writer writer, int indent_level)
Writes this Territory's information out in a textual format.
-
-
-
Field Detail
-
info
public BrokerTerritoryInfo info
-
acl
public BrokerAccessControlList acl
-
other_brokers_in_territory
public BrokerInfo[] other_brokers_in_territory
-
-
Constructor Detail
-
BrokerCompleteTerritory
public BrokerCompleteTerritory()
Constructor.
-
BrokerCompleteTerritory
public BrokerCompleteTerritory(BrokerTerritoryInfo info)
Constructor. Sets the territory info field.
-
-
Method Detail
-
retrieve
public static BrokerCompleteTerritory retrieve(BrokerAdminClient client) throws BrokerException
Retrieves the information about a Territory based on the given broker admin client.- Throws:
BrokerNullParameterException
- If client null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
refresh
public void refresh(BrokerAdminClient client) throws BrokerException
Refreshes the information about a Territory based on the given broker admin client.- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
store
public void store(BrokerAdminClient client) throws BrokerException
Stores the information from this Territory into the broker for which the given client object has been provided. It does this by first confirming that the broker belongs to the given territory. If it does not, then the territory is joined (if found on any of the brokers in the other_brokers_in_territory list), or created.All specifics about a territory are overwritten.
- The auth_type and encrypt_level in the info member replace the current settings in the territory.
- If the access control list is set it replaces the existing one.
- Throws:
BrokerInvalidAccessListException
- If the access list is not valid.BrokerNullParameterException
- If the client parameter is null or the instance variable info or info.territory_name are null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
write
public void write(java.io.Writer writer, int indent_level) throws BrokerException, java.io.IOException
Writes this Territory'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 '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 Territory'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 Territory'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
-
-