webMethods Broker Administration Java API
Version 9.5.1.0.171 091713

COM.activesw.api.client
Class BrokerServerClient

java.lang.Object
  extended by COM.activesw.api.client.BrokerServerClient

public class BrokerServerClient
extends java.lang.Object

Representation of an Broker Server client.

Many calls say they can throw a "communications exception". These exceptions are:

BrokerCommFailureException
If a networking error occurs.
BrokerConnectionClosedException
If the broker disconnects from the application.
BrokerFailureException
If an error occurs on the broker which prevents the operation from being completed.
BrokerProtocolException
If an error occurs in communication between the broker and the application.
BrokerTimeoutException
If the request was not handled in a reasonable time. Most operations use the default timeout of 30 seconds.


Field Summary
static int BROKER_SERVER_DEFAULT_PORT
           
static int PUBLISH_PROCESSING_ACTIVE
           
static int PUBLISH_PROCESSING_PAUSE
           
static int SERVER_LOG_ALL_ENTRIES
           
static int SERVER_STATUS_ERROR
           
static int SERVER_STATUS_FAILED
           
static int SERVER_STATUS_RUNNING
           
static int SERVER_STATUS_STARTING
           
static int SERVER_STATUS_STOPPED
           
static int SERVER_STATUS_STOPPING
           
static int SERVER_STATUS_UNKNOWN
           
static int SSL_STATUS_DISABLED
           
static int SSL_STATUS_ENABLED
           
static int SSL_STATUS_ERROR
           
static int SSL_STATUS_NOT_SUPPORTED
           
 
Constructor Summary
BrokerServerClient(java.lang.String broker_host, BrokerConnectionDescriptor desc)
          Create a Broker server client.
 
Method Summary
 boolean checkMetaDataBackup()
          Verifies that the backup of the meta-data is still OK to proceed.
 void createBroker(java.lang.String broker_name, java.lang.String description, boolean is_default)
          Create a Broker.
 void destroy()
          Destroy the server client.
 void endMetaDataBackup()
          Notifies the broker that backup of the meta-data is complete.
 java.util.Locale getActiveFilterCollationLocale()
          Returns the active Broker Server Filter Collation locale.
 int getActivePort()
          Get the base port currently being used by the Broker server.
 BrokerProcessInfo getActiveProcessInfo()
          Get the process information currently in use by the Broker server.
 BrokerSSLConfig getActiveSSLConfig()
          Get the SSL configuration currently in use on by the Broker server.
 BrokerSSLConfigV2 getActiveSSLConfigV2()
          Get the SSL configuration currently in use on by the Broker server.
 BrokerSSLIdentity getActiveSSLIdentity()
          Get the BrokerServer's SSL identity that is currently in use on by the Broker server.
 BrokerAccessControlList getAdminACL()
          Get the Broker server's administrative access control list (ACL).
 int getAuditOnErrorState()
          Returns 1 if the audit error state is enabled and 0 if the audit error state is disabled
 short[] getAuditOperations()
          Returns the audit operations
 COM.activesw.api.client.BrokerAuditLogEntry[] getAuditRecords(java.lang.Integer noRecords, java.lang.Integer AckId, int msecs)
          Reads the 'noRecords' number of audit records with AckId as the last accessed record id.
 int getAuditState()
          Returns 1 if the audit state is enabled and 0 if the audit state is disabled
 java.util.Locale[] getAvailableLocales()
           
 COM.activesw.api.client.BrokerBasicAuthIdentity getBasicAuthIdentity()
          Returns the Broker Server's basic authentication identity that is in use.
 boolean getBasicAuthStatus()
          Returns whether basic authentication is configured on Broker Server.
 BrokerInfo[] getBrokers()
          Get the list of Brokers in a given server.
 boolean getBypassAuthCheckStatus()
          Returns whether to bypass basic authentication checks on Broker Server.
 BrokerConnectionDescriptor getConnectionDescriptor()
           
 java.lang.String getDefaultBrokerName()
          Get the name of the default Broker in the server.
 java.lang.String getDescription()
          Get the Broker server description.
 java.lang.String getDNFromKeystore(java.lang.String keystore, java.lang.String password, BrokerSSLConfigV2.KeystoreType keystoreType)
          Get the distinguished name in the given keystore on the broker server.
 java.lang.String[] getDNsFromCertFile(java.lang.String certificate_file, java.lang.String password)
          Get the list of distinguished names available in the given certificate file on the broker server.
protected  java.util.Locale getFilterCollationLocaleInternal(boolean saved)
           
 java.lang.String getFipsMode()
          Returns the FIPS mode set on the Broker Server.
 java.util.Map<java.lang.String,java.lang.String> getHardwareInfo()
          Get the Broker server hardware info string.
 java.lang.String getHostName()
          Get the host name of the Broker server.
 java.lang.String getIssuerDNFromKeystore(java.lang.String keystore, java.lang.String password, BrokerSSLConfigV2.KeystoreType keystoreType)
          Get the issuer distinguished name in the given keystore on the broker server.
 java.lang.String getLicense()
          Deprecated. Deprecated in webMethods Broker 9.0, instead use getLicenseFileName()
 java.lang.String getLicenseContent()
          Get the Broker Server license file content.
 java.lang.String getLicenseFileName()
          Get the Broker Server license file name.
 BrokerLogConfig getLogConfig()
          Get the Broker server logging configuration.
 java.lang.String[] getMetaDataStorageFiles()
          Get the path names for the MetaData storage files.
 int getMonitorPort()
          Get the broker monitor port managing the current Broker Server.
 java.lang.String getProductDisplayName()
          Get the Product display name.
 int getPublicationProcessingState()
          Get the broker server publication processing state.
 java.lang.String[] getRootDNsFromCertFile(java.lang.String certificate_file, java.lang.String password)
          Get the list of trusted root distinguished names available in the given certificate file on the broker server.
 java.lang.String[] getRootDNsFromTruststore(java.lang.String truststore, BrokerSSLConfigV2.TruststoreType truststoreType)
          Get the list of trusted root distinguished names available in the given truststore on the broker server.
 java.util.Locale getSavedFilterCollationLocale()
          Returns the saved Broker Server Filter Collation locale.
 BrokerSSLConfig getSavedSSLConfig()
          Get the SSL configuration to be used next time the Broker server is started.
 BrokerSSLConfigV2 getSavedSSLConfigV2()
          Get the SSL configuration to be used next time the Broker server is started.
 BrokerSSLIdentity getSavedSSLIdentity()
          Get the BrokerServer's SSL identity that will be used the next time the Broker server is restarted.
 BrokerServerLogEntry[] getServerLogEntries(BrokerDate first_entry, java.lang.String locale, int num_entries)
           
 COM.activesw.api.client.BrokerServerLogInfo getServerLogStatus()
          Get the server log status.
static int getServerProcessRunStatus(java.lang.String broker_host)
          Specifies whether the Broker Server is online, stopped, starting, stopping, unresponsive, failed, or unknown.
static int getServerProcessRunStatus(java.lang.String broker_monitor_host, int monitorPort, int brokerPort)
           
 BrokerSSLStatus getSSLStatus()
          Get the current status of the Broker server SSL configuration.
 BrokerEvent getStats()
          Get the Broker server statistics.
 BrokerEvent getStorageStats()
          Get the Broker server storage statistics.
 BrokerEvent getUsageStats()
          Get the Broker server system usage statistics.
 java.lang.String getVersion()
          Get the Broker server version string.
 int getVersionNumber()
          Get the broker server's version number.
 boolean isConnectionUsingSSL()
           
 boolean isStreamingEnabled()
          Returns true if streaming is enabled on the Broker Server.
 void pausePublishProcessing()
          pause broker server publication processing.
 void pruneServerLog(BrokerDate older_than)
          Delete entries from the server log.
 void registerConnectionCallback(BrokerServerConnectionCallback obj, java.lang.Object client_data)
          Register a connection callback for this client.
 void resumePublishProcessing()
          resume broker server publication processing.
 void setAdminACL(BrokerAccessControlList acl)
          Set the Broker server's administrative access control list (ACL).
 void setAuditOnErrorState(int state)
          Sets the audit error state and the action for the audit log error
 void setAuditOperations(short[] ops)
          Sets the current audit operations as specified by the values in ops.
 void setAuditState(int state)
          Enables/Disables the audit state.
 void setBasicAuthIdentity(COM.activesw.api.client.BrokerBasicAuthIdentity new_identity)
          Sets the Broker Server's identity for basic authentication.
 void setDefaultBrokerName(java.lang.String broker_name)
          Set the name of the default Broker in the server.
 void setDescription(java.lang.String description)
          Set the Broker server description.
 void setFilterCollationLocale(java.lang.String locale)
          Set the Broker Server Filter Collation locale.
 void setLicense(java.lang.String license)
          Deprecated. Deprecated in webMethods Broker 9.0, instead use setLicenseFileName(String)
 void setLicenseContent(java.lang.String licenseFileContent)
          Set the license file content for Broker Server.
 void setLicenseFile(java.lang.String licenseFile)
          Deprecated. Deprecated in webMethods Broker 9.0, instead use setLicenseFileName(String)
 void setLicenseFileName(java.lang.String licenseFileName)
          Set the license file name for Broker Server.
 void setLogConfig(BrokerLogConfig log_config)
          Set the Broker server logging configuration.
 void setSSLConfig(BrokerSSLConfig new_config)
          Set the SSL configuration to be used next time the Broker server is started.
 void setSSLConfig(java.lang.String certificate_file, java.lang.String password, java.lang.String distinguished_name)
          Set the SSL configuration to be used next time the Broker server is started.
 void setSSLConfigV2(BrokerSSLConfigV2 new_config)
          Set the SSL configuration to be used next time the Broker server is started.
 boolean startMetaDataBackup()
          Notifies the broker that backup of the meta-data is going to start.
static void startServerProcess(java.lang.String broker_host)
          Start the Broker server process (if it is not already started).
static void startServerProcess(java.lang.String broker_monitor_host, int monitorPort, int brokerPort)
           
 void stopProcess()
          Stop the Broker server process.
 java.lang.String toString()
          Get a string with the server client information in a form suitable for human viewing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BROKER_SERVER_DEFAULT_PORT

public static final int BROKER_SERVER_DEFAULT_PORT
See Also:
Constant Field Values

SERVER_STATUS_STARTING

public static final int SERVER_STATUS_STARTING
See Also:
Constant Field Values

SERVER_STATUS_RUNNING

public static final int SERVER_STATUS_RUNNING
See Also:
Constant Field Values

SERVER_STATUS_STOPPING

public static final int SERVER_STATUS_STOPPING
See Also:
Constant Field Values

SERVER_STATUS_STOPPED

public static final int SERVER_STATUS_STOPPED
See Also:
Constant Field Values

SERVER_STATUS_ERROR

public static final int SERVER_STATUS_ERROR
See Also:
Constant Field Values

SERVER_STATUS_UNKNOWN

public static final int SERVER_STATUS_UNKNOWN
See Also:
Constant Field Values

SERVER_STATUS_FAILED

public static final int SERVER_STATUS_FAILED
See Also:
Constant Field Values

SSL_STATUS_ENABLED

public static final int SSL_STATUS_ENABLED
See Also:
Constant Field Values

SSL_STATUS_ERROR

public static final int SSL_STATUS_ERROR
See Also:
Constant Field Values

SSL_STATUS_DISABLED

public static final int SSL_STATUS_DISABLED
See Also:
Constant Field Values

SSL_STATUS_NOT_SUPPORTED

public static final int SSL_STATUS_NOT_SUPPORTED
See Also:
Constant Field Values

SERVER_LOG_ALL_ENTRIES

public static final int SERVER_LOG_ALL_ENTRIES
See Also:
Constant Field Values

PUBLISH_PROCESSING_ACTIVE

public static final int PUBLISH_PROCESSING_ACTIVE
See Also:
Constant Field Values

PUBLISH_PROCESSING_PAUSE

public static final int PUBLISH_PROCESSING_PAUSE
See Also:
Constant Field Values
Constructor Detail

BrokerServerClient

public BrokerServerClient(java.lang.String broker_host,
                          BrokerConnectionDescriptor desc)
                   throws BrokerException
Create a Broker server client. A server client is used to by administration applications to manage broker and system functions of brokers in that server. A Broker server client is said to have "limited access" if it is not authorized under the host's ACL. Some operations will give BrokerNoPermissionExceptions to clients with limited access. The shared state flag of the BrokerConnectionDescriptor is always ignored.

Throws:
BrokerCommFailureException - If problems occur establishing the connection.
BrokerHostNotFoundException - If the specified host does not exist.
BrokerNotRunningException - If the host exists but no broker server is running on that host.
BrokerNullParameterException - If broker_host is null.
BrokerSecurityException - If a secure connection is attempted but is rejected by the broker server.
BrokerException
Method Detail

destroy

public void destroy()
             throws BrokerException
Destroy the server client. Disconnects from the broker server. May throw any communications exception, but the local client object is marked as disconnected even if an exception is thrown.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getAdminACL

public BrokerAccessControlList getAdminACL()
                                    throws BrokerException
Get the Broker server's administrative access control list (ACL).

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerException

setAdminACL

public void setAdminACL(BrokerAccessControlList acl)
                 throws BrokerException
Set the Broker server's administrative access control list (ACL).

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If acl is null.
BrokerException

getDNFromKeystore

public java.lang.String getDNFromKeystore(java.lang.String keystore,
                                          java.lang.String password,
                                          BrokerSSLConfigV2.KeystoreType keystoreType)
                                   throws BrokerException
Get the distinguished name in the given keystore on the broker server.

The keystoreType parameter specifies the type of keystore: either PKCS12 or PEM. If the keystoreType is null, the type is assumed to be PKCS12.

Throws:
BrokerFileNotFoundException - If the keystore is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a keystore, or if the client has limited access.
BrokerNullParameterException - If keystore is null.
BrokerSSLConfigException - If the keystoreType is invalid.
BrokerException

getIssuerDNFromKeystore

public java.lang.String getIssuerDNFromKeystore(java.lang.String keystore,
                                                java.lang.String password,
                                                BrokerSSLConfigV2.KeystoreType keystoreType)
                                         throws BrokerException
Get the issuer distinguished name in the given keystore on the broker server.

The keystoreType parameter specifies the type of keystore: either PKCS12 or PEM. If the keystoreType is null, the type is assumed to be PKCS12.

Throws:
BrokerFileNotFoundException - If the keystore is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a keystore, or if the client has limited access.
BrokerNullParameterException - If keystore is null.
BrokerSSLConfigException - If the keystoreType is invalid.
BrokerException

getRootDNsFromTruststore

public java.lang.String[] getRootDNsFromTruststore(java.lang.String truststore,
                                                   BrokerSSLConfigV2.TruststoreType truststoreType)
                                            throws BrokerException
Get the list of trusted root distinguished names available in the given truststore on the broker server.

The truststoreType parameter specifies the type of truststore: either PEM or DIR. If the truststoreType is null, the type is assumed to be PEM.

Throws:
BrokerFileNotFoundException - If the certificate file is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a certificate file, or if the client has limited access.
BrokerNullParameterException - If certificate_file is null.
BrokerException

getDNsFromCertFile

public java.lang.String[] getDNsFromCertFile(java.lang.String certificate_file,
                                             java.lang.String password)
                                      throws BrokerException
Get the list of distinguished names available in the given certificate file on the broker server. The password parameter may be null if the certificate_file is the same as the Broker's active certificate file. In these cases, the Broker's active certificate file and password are used. If the broker does not currently have an active SSL setup, then null parameter exceptions will be returned as appropriate.

Throws:
BrokerFileNotFoundException - If the certificate file is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a certificate file, or if the client has limited access.
BrokerNullParameterException - If certificate_file is null.
BrokerException

getRootDNsFromCertFile

public java.lang.String[] getRootDNsFromCertFile(java.lang.String certificate_file,
                                                 java.lang.String password)
                                          throws BrokerException
Get the list of trusted root distinguished names available in the given certificate file on the broker server. The password parameter may be null if the certificate_file is the same as the Broker's active certificate file. In these cases, the Broker's active certificate file and password are used. If the broker does not currently have an active SSL setup, then null parameter exceptions will be returned as appropriate.

Throws:
BrokerFileNotFoundException - If the certificate file is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a certificate file, or if the client has limited access.
BrokerNullParameterException - If certificate_file is null.
BrokerException

getActiveSSLConfigV2

public BrokerSSLConfigV2 getActiveSSLConfigV2()
                                       throws BrokerException
Get the SSL configuration currently in use on by the Broker server. This may not be the same as the most recently set configuration. See setSSLConfig() for more information.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the Broker does not support the old form of SSL configuration.
BrokerException

getSavedSSLConfigV2

public BrokerSSLConfigV2 getSavedSSLConfigV2()
                                      throws BrokerException
Get the SSL configuration to be used next time the Broker server is started. This may not be the same as the active configuration. See setSSLConfig() for more information.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the Broker does not support the old form of SSL configuration.
BrokerException

setSSLConfigV2

public void setSSLConfigV2(BrokerSSLConfigV2 new_config)
                    throws BrokerException
Set the SSL configuration to be used next time the Broker server is started. To disable SSL, set the keystore to null. Note that the broker keeps both its active SSL configuration and a saved configuration to use on the next startup. This is because the broker must be restarted to change its SSL configuration. When the configuration is first made, the broker will immediately adopt it, but all future changes are merely saved away for the next restart. Thus, the active and saved configurations may not match.

Throws:
BrokerFileNotFoundException - If the certificate file is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a certificate file, or if the client has limited access.
BrokerNullParameterException - If distinguished_name is null when certificate_file is non-null.
BrokerUnknownNameException - If a distinguished name is specified but does not exist in the certificate file.
BrokerIncompatibleVersionException - If the Broker does not support the new form of SSL configuration.
BrokerSSLConfigException - If there is a problem with the SSL configuration.
BrokerException

setBasicAuthIdentity

public void setBasicAuthIdentity(COM.activesw.api.client.BrokerBasicAuthIdentity new_identity)
                          throws BrokerException
Sets the Broker Server's identity for basic authentication. To disable Basic Auth, set the user name to null.

Throws:
BrokerInvalidClientException - The BrokerServerClient has been destroyed or is disconnected.
BrokerIncompatibleVersionException - Broker Server does not support this operation.
BrokerNullParameterException - The new_identity parameter is null.
BrokerBasicAuthFailureException - Basic Authentication failed for the user.
BrokerException

getBasicAuthIdentity

public COM.activesw.api.client.BrokerBasicAuthIdentity getBasicAuthIdentity()
                                                                     throws BrokerException
Returns the Broker Server's basic authentication identity that is in use.

Throws:
BrokerInvalidClientException - The BrokerServerClient has been destroyed or is disconnected.
BrokerNoPermissionException - The client does not have permission to obtain the Broker's basic authentication identity.
BrokerIncompatibleVersionException - Broker Server does not support this operation.
BrokerException

getActiveSSLConfig

public BrokerSSLConfig getActiveSSLConfig()
                                   throws BrokerException
Get the SSL configuration currently in use on by the Broker server. This may not be the same as the most recently set configuration. See setSSLConfig() for more information.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the Broker does not support the old form of SSL configuration.
BrokerException

getSavedSSLConfig

public BrokerSSLConfig getSavedSSLConfig()
                                  throws BrokerException
Get the SSL configuration to be used next time the Broker server is started. This may not be the same as the active configuration. See setSSLConfig() for more information.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the Broker does not support the old form of SSL configuration.
BrokerException

setSSLConfig

public void setSSLConfig(java.lang.String certificate_file,
                         java.lang.String password,
                         java.lang.String distinguished_name)
                  throws BrokerException
Set the SSL configuration to be used next time the Broker server is started. To disable SSL, set the certificate_file to null. To change the distinguished name within the same file without giving the password again, pass the current certificate_file with the password as null. Note that the broker keeps both its active SSL configuration and a saved configuration to use on the next startup. This is because the broker must be restarted to change its SSL configuration. When the configuration is first made, the broker will immediately adopt it, but all future changes are merely saved away for the next restart. Thus, the active and saved configurations may not match.

Throws:
BrokerFileNotFoundException - If the certificate file is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a certificate file, or if the client has limited access.
BrokerNullParameterException - If distinguished_name is null when certificate_file is non-null.
BrokerUnknownNameException - If a distinguished name is specified but does not exist in the certificate file.
BrokerIncompatibleVersionException - If the Broker does not support the old form of SSL configuration.
BrokerException

setSSLConfig

public void setSSLConfig(BrokerSSLConfig new_config)
                  throws BrokerException
Set the SSL configuration to be used next time the Broker server is started. To disable SSL, set the certificate_file to null. To change the distinguished name within the same file without giving the password again, pass the current certificate_file with the password as null. Note that the broker keeps both its active SSL configuration and a saved configuration to use on the next startup. This is because the broker must be restarted to change its SSL configuration. When the configuration is first made, the broker will immediately adopt it, but all future changes are merely saved away for the next restart. Thus, the active and saved configurations may not match.

Throws:
BrokerFileNotFoundException - If the certificate file is not found or cannot be read.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the password is invalid or if the file is not a certificate file, or if the client has limited access.
BrokerNullParameterException - If distinguished_name is null when certificate_file is non-null.
BrokerUnknownNameException - If a distinguished name is specified but does not exist in the certificate file.
BrokerIncompatibleVersionException - If the Broker does not support the old form of SSL configuration.
BrokerException

getActiveSSLIdentity

public BrokerSSLIdentity getActiveSSLIdentity()
                                       throws BrokerException
Get the BrokerServer's SSL identity that is currently in use on by the Broker server. This may not be the same as the one most recently set.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the Broker does not support this call.
BrokerException

getSavedSSLIdentity

public BrokerSSLIdentity getSavedSSLIdentity()
                                      throws BrokerException
Get the BrokerServer's SSL identity that will be used the next time the Broker server is restarted. This may not be the same as the active identity.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the Broker does not support this call.
BrokerException

getSSLStatus

public BrokerSSLStatus getSSLStatus()
                             throws BrokerException
Get the current status of the Broker server SSL configuration. This operation is open to all users. The level value can be any of the BrokerConnectionDescriptor.ENCRYPT_LEVEL_* values. The status value can be any of the SSL_STATUS_* values. If the value is SSL_STATUS_ERROR, then the error string is set to a description of the failure, otherwise it is null.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getBasicAuthStatus

public boolean getBasicAuthStatus()
                           throws BrokerException
Returns whether basic authentication is configured on Broker Server. The possible values are "True" and "False". This operation is open to all users.

Throws:
BrokerInvalidClientException - The BrokerServerClient has been destroyed or is disconnected.
BrokerIncompatibleVersionException - Broker Server does not support this operation.
BrokerException

getBypassAuthCheckStatus

public boolean getBypassAuthCheckStatus()
                                 throws BrokerException
Returns whether to bypass basic authentication checks on Broker Server. The possible values are "True" and "False". This operation is open to all users.

Throws:
BrokerInvalidClientException - The BrokerServerClient has been destroyed or is disconnected.
BrokerIncompatibleVersionException - Broker Server does not support this operation.
BrokerException

getHostName

public java.lang.String getHostName()
Get the host name of the Broker server.


getActivePort

public int getActivePort()
                  throws BrokerException
Get the base port currently being used by the Broker server. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getMonitorPort

public int getMonitorPort()
                   throws BrokerException
Get the broker monitor port managing the current Broker Server. This operation is open to all users.

Returns:
the Monitor port managing this server
Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getActiveProcessInfo

public BrokerProcessInfo getActiveProcessInfo()
                                       throws BrokerException
Get the process information currently in use by the Broker server.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerException

getLogConfig

public BrokerLogConfig getLogConfig()
                             throws BrokerException
Get the Broker server logging configuration. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

setLogConfig

public void setLogConfig(BrokerLogConfig log_config)
                  throws BrokerException
Set the Broker server logging configuration. Any log config entries which have the 'value' parameter set, when the value is not required by the config entry will simply cause the value to be ignored.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerInvalidLogConfigException - If one or more log configuration entries are not valid. If this exception is thrown, all valid entries are still set.
BrokerNoPermissionException - If the client has limited access.
BrokerException

getServerLogStatus

public COM.activesw.api.client.BrokerServerLogInfo getServerLogStatus()
                                                               throws BrokerException
Get the server log status.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the version of the broker is known not to this operation.
BrokerNoPermissionException - If the client has limited access.
BrokerException

getServerLogEntries

public BrokerServerLogEntry[] getServerLogEntries(BrokerDate first_entry,
                                                  java.lang.String locale,
                                                  int num_entries)
                                           throws BrokerException
Throws:
BrokerException

pruneServerLog

public void pruneServerLog(BrokerDate older_than)
                    throws BrokerException
Delete entries from the server log. Deletes all entries from the given date (inclusive) and older.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the version of the broker is known not to this operation.
BrokerNullParameterException - If older_than is null.
BrokerNoPermissionException - If the client has limited access.
BrokerException

getLicense

@Deprecated
public java.lang.String getLicense()
                            throws BrokerException
Deprecated. Deprecated in webMethods Broker 9.0, instead use getLicenseFileName()

Throws:
BrokerException

setLicense

@Deprecated
public void setLicense(java.lang.String license)
                throws BrokerException
Deprecated. Deprecated in webMethods Broker 9.0, instead use setLicenseFileName(String)

Throws:
BrokerException

setLicenseFile

@Deprecated
public void setLicenseFile(java.lang.String licenseFile)
                    throws BrokerException
Deprecated. Deprecated in webMethods Broker 9.0, instead use setLicenseFileName(String)

Throws:
BrokerException

getLicenseFileName

public java.lang.String getLicenseFileName()
                                    throws BrokerException
Get the Broker Server license file name. Returns the license file name for webMethods Broker 8.0 or later. Returns the license key for webMethods Broker 7.1.2 or earlier versions.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerException

setLicenseFileName

public void setLicenseFileName(java.lang.String licenseFileName)
                        throws BrokerException
Set the license file name for Broker Server. Set the license file name for webMethods Broker 8.0 or later. Set the license key for webMethods Broker 7.1.2 or earlier versions.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerInvalidLicenseException - If the license file is not a valid license file.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If license is null.
BrokerException

getLicenseContent

public java.lang.String getLicenseContent()
                                   throws BrokerException
Get the Broker Server license file content. Applicable only for webMethods Broker version 8.0 or later.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the broker does not support getLicenseContent
BrokerNoPermissionException - If the client has limited access.
BrokerException

setLicenseContent

public void setLicenseContent(java.lang.String licenseFileContent)
                       throws BrokerException
Set the license file content for Broker Server. Applicable only for webMethods Broker version 8.0 or later.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerInvalidLicenseException - If the license file is not a valid license file.
BrokerNoPermissionException - If the client has limited access.
BrokerIncompatibleVersionException - If the broker does not support setLicenseContent
BrokerNullParameterException - If license is null.
BrokerException

getDescription

public java.lang.String getDescription()
                                throws BrokerException
Get the Broker server description. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

setDescription

public void setDescription(java.lang.String description)
                    throws BrokerException
Set the Broker server description.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If description is null.
BrokerException

getVersionNumber

public int getVersionNumber()
Get the broker server's version number. Returns one of the BrokerClient.VERSION_* contant values.

If the broker server is newer than the client's version, the client's version is reported.


getVersion

public java.lang.String getVersion()
                            throws BrokerException
Get the Broker server version string. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getProductDisplayName

public java.lang.String getProductDisplayName()
                                       throws BrokerException
Get the Product display name. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getHardwareInfo

public java.util.Map<java.lang.String,java.lang.String> getHardwareInfo()
                                                                 throws BrokerException
Get the Broker server hardware info string.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getServerProcessRunStatus

public static int getServerProcessRunStatus(java.lang.String broker_host)
                                     throws BrokerException
Specifies whether the Broker Server is online, stopped, starting, stopping, unresponsive, failed, or unknown. The state can be any of the following values: SERVER_STATUS_RUNNING SERVER_STATUS_STOPPED SERVER_STATUS_STARTING SERVER_STATUS_STOPPING SERVER_STATUS_ERROR SERVER_STATUS_FAILED SERVER_STATUS_UNKNOWN

Throws:
BrokerHostNotFoundException - If the specified host does not exist.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNotRunningException - If the host exists but no broker monitor is running on that host.
BrokerNullParameterException - If broker_host is null.
BrokerUnknownServerException - If the specified host has a monitor running, but no server is configured on the specified port.
BrokerException

getServerProcessRunStatus

public static int getServerProcessRunStatus(java.lang.String broker_monitor_host,
                                            int monitorPort,
                                            int brokerPort)
                                     throws BrokerException
Throws:
BrokerException

startServerProcess

public static void startServerProcess(java.lang.String broker_host)
                               throws BrokerException
Start the Broker server process (if it is not already started).

Throws:
BrokerCommFailureException - If problems occur establishing the connection.
BrokerHostNotFoundException - If the specified host does not exist.
BrokerNotRunningException - If the host exists but no broker server is running on that host.
BrokerNullParameterException - If broker_host is null.
BrokerUnknownServerException - If the specified host has a monitor running, but no server is configured on the specified port.
BrokerException

startServerProcess

public static void startServerProcess(java.lang.String broker_monitor_host,
                                      int monitorPort,
                                      int brokerPort)
                               throws BrokerException
Throws:
BrokerException

stopProcess

public void stopProcess()
                 throws BrokerException
Stop the Broker server process. This operation will also destroy() this client.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerException

getStats

public BrokerEvent getStats()
                     throws BrokerException
Get the Broker server statistics. Each statistic is stored as a field in the event object. The statistics are: This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getUsageStats

public BrokerEvent getUsageStats()
                          throws BrokerException
Get the Broker server system usage statistics. Each statistic is stored as a field in the event object. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getStorageStats

public BrokerEvent getStorageStats()
                            throws BrokerException
Get the Broker server storage statistics. Each statistic is stored as a field in the event object. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

setFilterCollationLocale

public void setFilterCollationLocale(java.lang.String locale)
                              throws BrokerException
Set the Broker Server Filter Collation locale. Effective the next time the server restarts.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If description is null.
BrokerInvalidNameException - If the locale name is invalid.
BrokerException

getActiveFilterCollationLocale

public java.util.Locale getActiveFilterCollationLocale()
                                                throws BrokerException
Returns the active Broker Server Filter Collation locale.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If description is null.
BrokerInvalidNameException - If the locale name is invalid.
BrokerException

getSavedFilterCollationLocale

public java.util.Locale getSavedFilterCollationLocale()
                                               throws BrokerException
Returns the saved Broker Server Filter Collation locale.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If description is null.
BrokerInvalidNameException - If the locale name is invalid.
BrokerException

getFilterCollationLocaleInternal

protected java.util.Locale getFilterCollationLocaleInternal(boolean saved)
                                                     throws BrokerException
Throws:
BrokerException

createBroker

public void createBroker(java.lang.String broker_name,
                         java.lang.String description,
                         boolean is_default)
                  throws BrokerException
Create a Broker. It can optionally be created as the default broker.

Throws:
BrokerExistsException - If a broker with the given name already exists.
BrokerInvalidBrokerNameException - If the broker name is not valid.
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerNullParameterException - If broker_name or description are is null.
BrokerException

getBrokers

public BrokerInfo[] getBrokers()
                        throws BrokerException
Get the list of Brokers in a given server. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getDefaultBrokerName

public java.lang.String getDefaultBrokerName()
                                      throws BrokerException
Get the name of the default Broker in the server. Returns null if there is no default broker. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

setDefaultBrokerName

public void setDefaultBrokerName(java.lang.String broker_name)
                          throws BrokerException
Set the name of the default Broker in the server. If broker_name is null, then there will be no default broker.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access.
BrokerUnknownBrokerNameException - If the broker does not exist in the server.
BrokerException

registerConnectionCallback

public void registerConnectionCallback(BrokerServerConnectionCallback obj,
                                       java.lang.Object client_data)
                                throws BrokerException
Register a connection callback for this client. Calling this on a client which already has an existing callback will replace that callback. 'obj' may be null to clear the callback. 'client_data' may be null. The callback method will be called with connect_state set to BrokerClient.CONNECT_STATE_DISCONNECTED if the client is disconnected. It will be called with BrokerClient.CONNECT_STATE_CONNECTED if the client connection is re-established (only happens if automatic reconnect is enabled). It will be called with BrokerClient.CONNECT_STATE_RECONNECTED if the disconnect is discovered, but the connection is re-established immediately (only happens if automatic reconnect is enabled).

Throws:
BrokerInvalidClientException - If the client has been disconnected or destroyed.
BrokerException

startMetaDataBackup

public boolean startMetaDataBackup()
                            throws BrokerException
Notifies the broker that backup of the meta-data is going to start.

Returns:
True if it is safe to proceed with the backup
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerIncompatibleVersionException - If the broker does not support changelocks.
BrokerException

endMetaDataBackup

public void endMetaDataBackup()
                       throws BrokerException
Notifies the broker that backup of the meta-data is complete.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerIncompatibleVersionException - If the broker does not support changelocks.
BrokerException

checkMetaDataBackup

public boolean checkMetaDataBackup()
                            throws BrokerException
Verifies that the backup of the meta-data is still OK to proceed.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerIncompatibleVersionException - If the broker does not support changelocks.
BrokerException

getMetaDataStorageFiles

public java.lang.String[] getMetaDataStorageFiles()
                                           throws BrokerException
Get the path names for the MetaData storage files.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerIncompatibleVersionException - If the broker does not support changelocks.
BrokerException

toString

public java.lang.String toString()
Get a string with the server client information in a form suitable for human viewing. Returns null if the server client is not valid.

Overrides:
toString in class java.lang.Object

getAvailableLocales

public java.util.Locale[] getAvailableLocales()
                                       throws BrokerException
Throws:
BrokerException

getPublicationProcessingState

public int getPublicationProcessingState()
                                  throws BrokerException
Get the broker server publication processing state. This operation is open to all users.

Returns:
the publication processing state of this server. PUBLISH_PROCESSING_ACTIVE (0) - event publication is active PUBLISH_PROCESSING_PAUSE (1) - event publication is paused
Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

pausePublishProcessing

public void pausePublishProcessing()
                            throws BrokerException
pause broker server publication processing. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

resumePublishProcessing

public void resumePublishProcessing()
                             throws BrokerException
resume broker server publication processing. This operation is open to all users.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerException

getAuditRecords

public COM.activesw.api.client.BrokerAuditLogEntry[] getAuditRecords(java.lang.Integer noRecords,
                                                                     java.lang.Integer AckId,
                                                                     int msecs)
                                                              throws BrokerException
Reads the 'noRecords' number of audit records with AckId as the last accessed record id. It will throw the timeout exception if it does not receive response from the server.

Parameters:
noRecords - Number of records to be read from the Audit log. This number must be less than the total number of audit records.
AckId - This is an optional parameter. It is the last accessed record id of the records to be read.
msecs - The number of milliseconds to wait for the reply from the server before timing out.
Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within msecs (No audit log entries in this case)
BrokerInvalidClientException - If the client has been destroyed.
BrokerNoPermissionException - If the client has limited access i.e. no access to retrieve audit records.

setAuditOperations

public void setAuditOperations(short[] ops)
                        throws BrokerException
Sets the current audit operations as specified by the values in ops.

Parameters:
ops - Ops is an array of Boolean values to enable/disable the audit operations.
Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within the default timeout of 30000ms
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the Broker version is incompatible and does not support the old form of SSL configuration.
BrokerNoPermissionException - If the client has limited access i.e. no permission to set the audit operations.

setAuditState

public void setAuditState(int state)
                   throws BrokerException
Enables/Disables the audit state.

Parameters:
state - Boolean value enabled/disabled
Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within the default time out of 30000ms
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the Broker version is incompatible and does not support the old form of SSL configuration.
BrokerNoPermissionException - If the client has limited access and has has no permission to set the audit state.

getAuditState

public int getAuditState()
                  throws BrokerException
Returns 1 if the audit state is enabled and 0 if the audit state is disabled

Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within the default time out of 30000ms
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the Broker version is incompatible and does not support the old form of SSL configuration.
BrokerNoPermissionException - If the client has limited access and has no permission to get the audit state.

setAuditOnErrorState

public void setAuditOnErrorState(int state)
                          throws BrokerException
Sets the audit error state and the action for the audit log error

Parameters:
state - enabled/disabled
Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within the default time out of 30000ms
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the Broker version is incompatible and does not support the old form of SSL configuration.
BrokerNoPermissionException - If the client has limited access and has no permission to set the audit on error state.

getAuditOnErrorState

public int getAuditOnErrorState()
                         throws BrokerException
Returns 1 if the audit error state is enabled and 0 if the audit error state is disabled

Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within the default time out of 30000ms
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the Broker version is incompatible and does not support the old form of SSL configuration.
BrokerNoPermissionException - If the client has limited access and has no permission to get the audit on error state.

getAuditOperations

public short[] getAuditOperations()
                           throws BrokerException
Returns the audit operations

Throws:
BrokerException
BrokerTimeoutException - If the request was not handled within the default time out of 30000ms
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the Broker version is incompatible does not support the old form of SSL configuration.
BrokerNoPermissionException - If the client has limited access has no permission to get the audit operations.

isConnectionUsingSSL

public boolean isConnectionUsingSSL()
                             throws BrokerInvalidClientException
Throws:
BrokerInvalidClientException

getFipsMode

public java.lang.String getFipsMode()
                             throws BrokerException
Returns the FIPS mode set on the Broker Server.

Returns:
the version of Open SSL used if FIPS mode is enabled. or null if FIPS mode is disabled.
Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the broker does not support getFipsMode
BrokerNoPermissionException - If the client has limited access.
BrokerTimeoutException - .If the request was not handled in a reasonable time.
BrokerException

isStreamingEnabled

public boolean isStreamingEnabled()
                           throws BrokerException
Returns true if streaming is enabled on the Broker Server.

Throws:
BrokerInvalidClientException - If the client has been destroyed.
BrokerIncompatibleVersionException - If the broker does not support streaming.
BrokerNoPermissionException - If the client has limited access.
BrokerTimeoutException - If the request was not handled in a reasonable time.
BrokerException

getConnectionDescriptor

public BrokerConnectionDescriptor getConnectionDescriptor()

webMethods Broker Administration Java API
Version 9.5.1.0.171 091713


Copyright © 2001 - 2013 Software AG Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their suppliers.