Interface SasManagementMBean
-
public interface SasManagementMBean
The
SasManagementMBean
provides access to the SAS server configuration.A
SasManagementMBean
instance always manages the SAS server configuration for the currently active namespace for the client connection. It is not necessary to get a different MBean for different namespaces.- Since:
- Rhino 2.6.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
MBEAN_NAME
The name of this MBean, equal to the string "SAS".static String
OBJECT_NAME
The JMX Object Name of this MBean.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addServer(String server)
Add a server to the set of configured SAS servers.boolean
getAppendNodeID()
Determine if the cluster node ID should be appended to the system name.String
getBundlePrefixMapping(String name)
Get a bundle prefix mapping.int
getQueueSize()
Get the SAS facility queue size.String
getResourceIdentifier()
Get the SAS resource identifier associated with events sent to SAS.String
getServer()
Deprecated.UsegetServers()
instead.String[]
getServers()
Get the list of configured SAS servers.String
getSystemName()
Get the current system name sent to SAS on connection.String
getSystemType()
Get the current system type sent to SAS on connection.String
getSystemVersion()
Get the current system version sent to SAS on connection.boolean
isTracingEnabled()
Determine if the SAS facility is current configured to send trace messages to SAS.TabularData
listBundlePrefixMappings()
Get all bundle prefix mappings.void
removeBundlePrefixMapping(String name)
Remove a bundle prefix mapping.boolean
removeServer(String server)
Remove a server from the set of configured SAS servers.String[]
reportUnmappedBundles()
Get the set of all unmapped bundles.void
setAppendNodeID(boolean appendNodeID)
Set cluster node ID append behaviour.void
setBundlePrefixMapping(String name, String prefix)
Add or update a bundle prefix mapping.void
setQueueSize(int queueSize)
Set the SAS facility queue size.void
setResourceIdentifier(String resourceIdentifier)
Set the resource identifier of the SAS resource bundle to associate with events sent to the SAS server.void
setServer(String server)
Deprecated.void
setServers(String[] servers)
Set the SAS servers the SAS facility should send trace messages to.void
setSystemName(String systemName)
Set the system name to use when connecting to SAS.void
setSystemType(String systemType)
Set the system type to use when connecting to SAS.void
setSystemVersion(String systemVersion)
Set the system version to use when connecting to SAS.void
setTracingEnabled(boolean sasTracingEnabled, boolean force)
Enable or disable SAS tracing.
-
-
-
Field Detail
-
MBEAN_NAME
static final String MBEAN_NAME
The name of this MBean, equal to the string "SAS".
- See Also:
- Constant Field Values
-
OBJECT_NAME
static final String OBJECT_NAME
The JMX Object Name of this MBean.
-
-
Method Detail
-
isTracingEnabled
boolean isTracingEnabled() throws ConfigurationException
Determine if the SAS facility is current configured to send trace messages to SAS.
- Returns:
true
if SAS tracing is enabled,false
otherwise.- Throws:
ConfigurationException
- if the SAS configuration could not be read.- Since:
- Rhino 2.6.0
-
setTracingEnabled
void setTracingEnabled(boolean sasTracingEnabled, boolean force) throws IllegalStateException, ConfigurationException
Enable or disable SAS tracing. When tracing is enabled, the SAS facility sends trace messages to SAS.
Normally the SAS tracing configuration cannot be changed from enabled to disabled while the
SLEE state
for the current namespace is notSTOPPED
on any active cluster node. If theforce
argument to this method istrue
, the check for current SLEE state is bypassed and the configuration is changed regardless.- Parameters:
sasTracingEnabled
- boolean flag indicating whether or not the SAS facility will send trace messages to the configured server.force
- boolean flag indicating whether or not the current SLEE state should be ignored while making the configuration change.- Throws:
IllegalStateException
- if SAS tracing is currently enabled,sasTracingEnabled
andforce
were bothfalse
, and the SLEE was not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getQueueSize
int getQueueSize() throws ConfigurationException
Get the SAS facility queue size.
- Returns:
- the queue size.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
setQueueSize
void setQueueSize(int queueSize) throws IllegalStateException, ConfigurationException
Set the SAS facility queue size.
The queue size can only be modified if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
queueSize
- the new queue size.- Throws:
IllegalStateException
- if the specified queue size is different to that already configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getSystemName
String getSystemName() throws ConfigurationException
Get the current system name sent to SAS on connection.
- Returns:
- the system name sent to SAS on connection.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
setSystemName
void setSystemName(String systemName) throws NullPointerException, IllegalArgumentException, IllegalStateException, ConfigurationException
Set the system name to use when connecting to SAS.
The system name can only be modified if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
systemName
- the system name.- Throws:
NullPointerException
- ifsystemName
isnull
.IllegalArgumentException
- ifsystemName
is zero-length.IllegalStateException
- if the specified system name is different to that already configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getAppendNodeID
boolean getAppendNodeID() throws ConfigurationException
Determine if the cluster node ID should be appended to the system name.
- Returns:
true
if the node ID should be appended to the system name,false
if not.- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
setAppendNodeID
void setAppendNodeID(boolean appendNodeID) throws IllegalStateException, ConfigurationException
Set cluster node ID append behaviour.
In order to provide SAS with a unique system name for each Rhino cluster node, the node ID of each node can be appended to the system name send to SAS.
The append behaviour can only be modified if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
appendNodeID
-true
if the node ID should be appended to system name,false
otherwise.- Throws:
IllegalStateException
- if the specified append behaviour is different than that already configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getSystemType
String getSystemType() throws ConfigurationException
Get the current system type sent to SAS on connection.
- Returns:
- the system type sent to SAS on connection.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.2
-
setSystemType
void setSystemType(String systemType) throws NullPointerException, IllegalArgumentException, IllegalStateException, ConfigurationException
Set the system type to use when connecting to SAS.
The system type can only be modified if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
systemType
- the system type.- Throws:
NullPointerException
- ifsystemType
isnull
.IllegalArgumentException
- ifsystemType
is zero-length.IllegalStateException
- if the specified system type is different to that already configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.2
-
getSystemVersion
String getSystemVersion() throws ConfigurationException
Get the current system version sent to SAS on connection.
- Returns:
- the system version sent to SAS on connection.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.2
-
setSystemVersion
void setSystemVersion(String systemVersion) throws NullPointerException, IllegalArgumentException, IllegalStateException, ConfigurationException
Set the system version to use when connecting to SAS.
The system version can only be modified if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
systemVersion
- the system version.- Throws:
NullPointerException
- ifsystemType
isnull
.IllegalArgumentException
- ifsystemType
is zero-length.IllegalStateException
- if the specified system version is different to that already configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.2
-
addServer
void addServer(String server) throws NullPointerException, IllegalArgumentException, IllegalStateException, ConfigurationException
Add a server to the set of configured SAS servers.
Servers may be specified either by host name or IP address. A port may optionally be specified using the format
host:port
.New servers can only be added if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
server
- host name or IP address of the server to add.- Throws:
NullPointerException
- ifserver
isnull
.IllegalArgumentException
- ifserver
is zero-length.IllegalStateException
- if the specified server is not currently configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
removeServer
boolean removeServer(String server) throws IllegalStateException, ConfigurationException
Remove a server from the set of configured SAS servers. This must exactly match the server entry, including port if any.
Existing servers can only be removed if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
server
- host name or IP address of the server to remove.- Throws:
IllegalStateException
- if the specified server is currently configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getServer
@Deprecated String getServer() throws ConfigurationException
Deprecated.UsegetServers()
instead. Warning: will be removed.Get the host name/IP address of the configured SAS server.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
setServer
@Deprecated void setServer(String server) throws IllegalStateException, ConfigurationException
Deprecated.UseaddServer(String)
andremoveServer(String)
orsetServers(String[])
instead. Warning: will be removedSet the host name/IP address of the SAS server the SAS facility should send trace messages to
The server can only be changed if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
server
- the host name or IP address of the SAS server.- Throws:
ConfigurationException
- if an error occurred updating the SAS configuration.IllegalStateException
- if the specified server is not currently configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.- Since:
- Rhino 2.6.0
-
setServers
void setServers(String[] servers) throws ConfigurationException
Set the SAS servers the SAS facility should send trace messages to.
Servers may be specified either by host name or IP address. A port may optionally be specified using the format
host:port
.The server list can only be changed if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
servers
- the host names or IP addresses of the SAS servers.- Throws:
IllegalStateException
- if the specified server list is different to that currently configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getServers
String[] getServers() throws ConfigurationException
Get the list of configured SAS servers.
- Returns:
- a string array containing the host names or IP addresses of the configured servers.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
getResourceIdentifier
String getResourceIdentifier() throws ConfigurationException
Get the SAS resource identifier associated with events sent to SAS.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
setResourceIdentifier
void setResourceIdentifier(String resourceIdentifier) throws IllegalStateException, ConfigurationException
Set the resource identifier of the SAS resource bundle to associate with events sent to the SAS server.
The resource identifier can only be changed if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
resourceIdentifier
- the resource identifier to associate with the SAS connection, eg.com.metaswitch.volte-tas
- Throws:
IllegalStateException
- if the specified resource identifier is different to that currently configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
setBundlePrefixMapping
void setBundlePrefixMapping(String name, String prefix) throws NullPointerException, IllegalArgumentException, MappingAlreadyExistsException, ConfigurationException
Add or update a bundle prefix mapping.
Prefix is a number in the range 0x0001 to 0xFFFF.
- Parameters:
name
- the bundle name.prefix
- the bundle prefix mapping.- Throws:
NullPointerException
- if either argument isnull
.IllegalArgumentException
- if either argument is zero-length.MappingAlreadyExistsException
- if the specified prefix has already been associated with the target name.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
getBundlePrefixMapping
String getBundlePrefixMapping(String name) throws ConfigurationException
Get a bundle prefix mapping.
- Parameters:
name
- the bundle name.- Throws:
NullPointerException
- ifname
isnull
.IllegalArgumentException
- ifname
is zero-length.ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
listBundlePrefixMappings
TabularData listBundlePrefixMappings() throws ConfigurationException
Get all bundle prefix mappings.
The returned TabularData contains a CompositeData row for each mapping. The CompositeData contains two columns:
-
a java.lang.String column "name"
-
a java.lang.String column "prefix"
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
-
removeBundlePrefixMapping
void removeBundlePrefixMapping(String name) throws ConfigurationException, IllegalArgumentException
Remove a bundle prefix mapping.
Existing bundle prefix mappings can only be removed if SAS tracing is currently disabled or the
SLEE state
for the current namespace isSTOPPED
on all active cluster nodes.- Parameters:
name
- the bundle name.- Throws:
NullPointerException
- ifname
isnull
.IllegalArgumentException
- ifname
is zero-length, or a bundle mapping for the specified name does not exist.IllegalStateException
- if a bundle prefix mapping with the specified name is currently configured, SAS tracing is currently enabled, and the SLEE is not stopped on one or more active cluster nodes.ConfigurationException
- if an error occurred updating the SAS configuration.- Since:
- Rhino 2.6.0
-
reportUnmappedBundles
String[] reportUnmappedBundles() throws ConfigurationException
Get the set of all unmapped bundles.
- Returns:
- a string array, possibly empty, containing any unmapped bundle names.
- Throws:
ConfigurationException
- if an error occurred reading the SAS configuration.- Since:
- Rhino 2.6.0
-
-