Package com.isode.mhfcm
Class MHFCMContext
java.lang.Object
com.isode.mhfcm.MHFCMContext
This class represents an MHFCM configuration, and provides methods to
retrieve information about all components of the configuration.
- Since:
- 16.4
-
Constructor Summary
ConstructorsConstructorDescriptionMHFCMContext
(MHFCMContextParameters contextParameters) Initialise a new context.MHFCMContext
(MHFCMContextParameters contextParameters, AuthDetailsProvider authDetailsProvider) Initialise a new context, and provide an AuthDetailsProvider that can be used to ask the caller for authentication details when server connections are made -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Indicate that this context is no longer required.Returns a list of configured ACP 127 Circuits in the configuration.Section 3.2.3 IRS-REQ-3: ACP 142 channels list.static String
Get a full Isode version string, e.g.static String
Get a short Isode version string, e.g.Returns a list of configured ACP127 Access Points which provide access to S5066 servers.Returns a list of configured STANAG 5066 servers.Obtain the current service statuses of all components in the configuration.void
Close down any open ACP127 sessions and reconnect all known sessions.void
Close down DSA connection if open and reconnect.void
Close down Queue Manager connection if open and reconnect.void
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.toString()
-
Constructor Details
-
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
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 Details
-
getIsodeShortVersion
Get a short Isode version string, e.g. "R17.0a0-3"- Returns:
- Version string
- Since:
- 16.6
-
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
Close down any open ACP127 sessions and reconnect all known sessions.- Throws:
MHFCMException
- on connection error
-
reconnectDSA
Close down DSA connection if open and reconnect.- Throws:
MHFCMException
- on connection error
-
reconnectQueueManager
Close down Queue Manager connection if open and reconnect.- Throws:
MHFCMException
- on connection error
-
getACP142Channels
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
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
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
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
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
-
reloadConfiguration
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 connectionMHFCMException
-