Class BrokerCompleteServer
- java.lang.Object
-
- COM.activesw.api.client.BrokerCompleteServer
-
public class BrokerCompleteServer extends java.lang.Object
Holds all of the information describing a server as far as import and export are concerned.
-
-
Field Summary
Fields Modifier and Type Field Description BrokerAccessControlList
acl
BrokerCompleteBroker[]
brokers
java.lang.String
description
java.lang.String
host_name
java.lang.String
license_key
BrokerLogConfig
log_config
int
port
BrokerSSLConfig
ssl_config
BrokerSSLConfigV2
ssl_config_v2
java.lang.String
version
-
Constructor Summary
Constructors Constructor Description BrokerCompleteServer()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deepRefresh(BrokerServerClient client, java.lang.String client_id, java.lang.String client_group, java.lang.String app_name, BrokerConnectionDescriptor desc)
Refreshes the information about a Broker server based on the given client.static BrokerCompleteServer
deepRetrieve(BrokerServerClient client, java.lang.String client_id, java.lang.String client_group, java.lang.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.java.lang.String
toString()
Converts this server's information into a string.java.lang.String
toString(int indent_level)
Converts this server's information into a string.void
write(java.io.Writer writer, int indent_level)
Writes this server's information out in a textual format.
-
-
-
Field Detail
-
host_name
public java.lang.String host_name
-
description
public java.lang.String description
-
port
public int port
-
license_key
public java.lang.String license_key
-
log_config
public BrokerLogConfig log_config
-
ssl_config
public BrokerSSLConfig ssl_config
-
ssl_config_v2
public BrokerSSLConfigV2 ssl_config_v2
-
acl
public BrokerAccessControlList acl
-
brokers
public BrokerCompleteBroker[] brokers
-
version
public java.lang.String version
-
-
Method Detail
-
retrieve
public static BrokerCompleteServer retrieve(BrokerServerClient client) throws BrokerException
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, java.lang.String client_id, java.lang.String client_group, java.lang.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
public void refresh(BrokerServerClient client) throws BrokerException
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, java.lang.String client_id, java.lang.String client_group, java.lang.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
public void store(BrokerServerClient client) throws BrokerException
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
public void write(java.io.Writer writer, int indent_level) throws BrokerException, java.io.IOException
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:
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 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
public java.lang.String 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.
- Overrides:
toString
in classjava.lang.Object
-
-