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 Detail

      • 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 not STOPPED on any active cluster node. If the force argument to this method is true, 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 and force were both false, 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 is STOPPED 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
      • 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 is STOPPED 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
      • 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
      • 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 is STOPPED 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
      • 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 is STOPPED 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 is STOPPED 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
      • 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 is STOPPED on all active cluster nodes.

        Parameters:
        name - the bundle name.
        Throws:
        NullPointerException - if name is null.
        IllegalArgumentException - if name 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