Class MHFCMContext


  • public class MHFCMContext
    extends java.lang.Object
    This class represents an MHFCM configuration, and provides methods to retrieve information about all components of the configuration.
    Since:
    16.4
    • Constructor Detail

      • MHFCMContext

        public MHFCMContext​(MHFCMContextParameters contextParameters,
                            AuthDetailsProvider authDetailsProvider)
                     throws MHFCMException
        Initialise a new context, and provide an AuthDetailsProvider that can be used to ask the caller for authentication details when server connections are made
        Parameters:
        contextParameters - parameters used to define the scope for this context. Must not be null.
        authDetailsProvider - an optional AuthDetailsProvider which will be called if MHFCM API needs authentication details to connect to a server. This may be null.
        Throws:
        MHFCMException - if a context cannot be created
        Since:
        16.4
      • MHFCMContext

        public MHFCMContext​(MHFCMContextParameters contextParameters)
                     throws MHFCMException
        Initialise a new context.
        Parameters:
        contextParameters - parameters used to define the scope for this context. Must not be null.
        Throws:
        MHFCMException - if a context cannot be created
        Since:
        16.4
    • Method Detail

      • getIsodeShortVersion

        public static java.lang.String getIsodeShortVersion()
        Get a short Isode version string, e.g. "R17.0a0-3"
        Returns:
        Version string
        Since:
        16.6
      • getIsodeFullVersion

        public static java.lang.String getIsodeFullVersion()
        Get a full Isode version string, e.g. "isodejavalib 17.0a0-3 [22c1d3d39e] (diabolo.isode.net) of Wed 25 Oct 12:51:01 IST 2017"
        Returns:
        Version string including build information
        Since:
        16.6
      • reconnectACP127

        public void reconnectACP127()
                             throws MHFCMException
        Close down any open ACP127 sessions and reconnect all known sessions.
        Throws:
        MHFCMException - on connection error
      • reconnectDSA

        public void reconnectDSA()
                          throws MHFCMException
        Close down DSA connection if open and reconnect.
        Throws:
        MHFCMException - on connection error
      • reconnectQueueManager

        public void reconnectQueueManager()
                                   throws MHFCMException
        Close down Queue Manager connection if open and reconnect.
        Throws:
        MHFCMException - on connection error
      • getACP142Channels

        public java.util.List<ACP142Channel> getACP142Channels()
                                                        throws MHFCMException
        Section 3.2.3 IRS-REQ-3: ACP 142 channels list.

        Returns a list of the ACP142 Channels that are associated with this context.

        Returns:
        a list of channels, which will never be null, but may be an empty list.
        Throws:
        MHFCMException - if an error occurred.
      • getACP127Circuits

        public java.util.List<ACP127Circuit> getACP127Circuits()
                                                        throws MHFCMException
        Returns a list of configured ACP 127 Circuits in the configuration.
        Returns:
        a list of circuits. This will never be null but may be an empty list.
        Throws:
        MHFCMException - if an error occurs during this operation
      • getS5066Servers

        public java.util.List<S5066Server> getS5066Servers()
                                                    throws MHFCMException
        Returns a list of configured STANAG 5066 servers.
        Returns:
        a list of S5066Servers, which will never be null but may be an empty list.
        Throws:
        MHFCMException - if an error occurs during this operation
      • getS5066AccessPoints

        public java.util.List<S5066AccessPoint> getS5066AccessPoints()
                                                              throws MHFCMException
        Returns a list of configured ACP127 Access Points which provide access to S5066 servers.
        Returns:
        a list of S5066AccessPoints, which will never be null but may be an empty list.
        Throws:
        MHFCMException - if an error occurs during this operation
      • getServiceStatuses

        public java.util.HashMap<Component,​ServiceStatus> getServiceStatuses()
                                                                            throws MHFCMException
        Obtain the current service statuses of all components in the configuration.
        Returns:
        a HashMap (never null) containing information about each Component and its status. Services checked are: DSA (via read of Messaging Configuration entry) Queue Manager connection (via SOM QSTATUS command) ACP127 servers (via SOM ACP127STATUS commands) The following are not currently checked: S5066 servers (via SOM command to ACP127 servers) OTAM servers when implemented
        Throws:
        MHFCMException - if an error occurs during this operation
      • close

        public void close()
        Indicate that this context is no longer required. Any server connections will be closed. This context should not be used after calling this method.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • reloadConfiguration

        public void reloadConfiguration()
                                 throws MHFCMException
        Update the mt-serial attribute in the MTA's entry in the Directory, and then tell the Queue Manager to re-read its configuration from the Directory.
        Throws:
        NoServerConnectionException - if there is no server connection
        MHFCMException