Class BrokerCompleteServer
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
deepRefresh
(BrokerServerClient client, String client_id, String client_group, String app_name, BrokerConnectionDescriptor desc) Refreshes the information about a Broker server based on the given client.static BrokerCompleteServer
deepRetrieve
(BrokerServerClient client, String client_id, String client_group, String app_name, BrokerConnectionDescriptor desc) Retrieves all the information about a Broker server and creates an object.void
refresh
(BrokerServerClient client) Refreshes the information about a Broker server based on the given client.static BrokerCompleteServer
retrieve
(BrokerServerClient client) Retrieves the information about a Broker Server and creates an object.void
store
(BrokerServerClient client) Stores the information from this object into the server for which the given client object has been provided.toString()
Converts this server's information into a string.toString
(int indent_level) Converts this server's information into a string.void
Writes this server's information out in a textual format.
-
Field Details
-
host_name
-
description
-
port
public int port -
license_key
-
log_config
-
ssl_config
-
ssl_config_v2
-
acl
-
brokers
-
version
-
-
Constructor Details
-
BrokerCompleteServer
public BrokerCompleteServer()Constructor.
-
-
Method Details
-
retrieve
Retrieves the information about a Broker Server and creates an object. Retrieves the server information, but NOT the Brokers in the server.Any server information which the client does not have permission to read is set to null.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
deepRetrieve
public static BrokerCompleteServer deepRetrieve(BrokerServerClient client, String client_id, String client_group, String app_name, BrokerConnectionDescriptor desc) throws BrokerException Retrieves all the information about a Broker server and creates an object. Retrieves any Brokers which the client has permission to access. Follows the rules in BrokerCompleteBroker.deepRetrieve().The client_id, client_group, app_name, and desc are used in establishing connections to the individual brokers. See the constructor for BrokerAdminClient.
Any server information which the client does not have permission to read is set to null.
- Throws:
BrokerNullParameterException
- If client, client_group, or app_name are null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
refresh
Refreshes the information about a Broker server based on the given client. Refreshes the server information, but NOT the Brokers in the server.Any server information which the client does not have permission to read is set to null.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
deepRefresh
public void deepRefresh(BrokerServerClient client, String client_id, String client_group, String app_name, BrokerConnectionDescriptor desc) throws BrokerException Refreshes the information about a Broker server based on the given client. Refreshes everything including all the Brokers in the server.Rebuilds the 'brokers' array in this object. If any Broker no longer exists or if the client does not have permission to access a Broker, that Broker will not be found in the new 'brokers' array. The information refreshed within each broker follows the rules in BrokerCompleteBroker.deepRefresh().
The client_id, client_group, app_name, and desc are used in establishing connections to the individual brokers. See the constructor for BrokerAdminClient.
Any server information which the client does not have permission to read is set to null.
- Throws:
BrokerNullParameterException
- If client is null.BrokerInvalidClientException
- If client has been destroyed or disconnected.BrokerException
-
store
Stores the information from this object into the server for which the given client object has been provided.The host name in this object is ignored. Other values may be overwritten or merged.
- If the description is set, it replaces the existing value.
- If the port is set to something other than zero, it replaces the existing value.
- If the logging configuration is set, it replaces the existing value.
- If the SSL configuration is set, it replaces the existing value.
- If the DN access list is set, it replaces the existing value.
If an exception is thrown, nothing is changed.
- Throws:
BrokerInvalidClientException
- If the client is null or has been destroyed.BrokerNoPermissionException
- If the client does not have permission to change the specified information.BrokerException
-
write
Writes this server'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 host_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 server'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 server'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.
-