Class ConnectivityPlugin
- java.lang.Object
- 
- com.softwareag.connectivity.ConnectivityPlugin
 
- 
- Direct Known Subclasses:
- AbstractCodec,- AbstractTransport
 
 public abstract class ConnectivityPlugin extends java.lang.ObjectBase class that all codec and transport plug-ins inherit from.- See Also:
- AbstractCodec,- AbstractTransport
 
- 
- 
Field SummaryFields Modifier and Type Field Description java.lang.StringchainIdThe identifier used for the chain this plug-in is part of.java.util.Map<java.lang.String,java.lang.Object>configConfiguration of this plug-in.static java.lang.StringCONNECTIVITY_API_VERSIONA string constant containing the 4-digit version number for this API.PluginHosthostInterface to support miscellaneous requests from this plug-in to the host system.org.slf4j.LoggerloggerA slf4j logger to be used by this plug-in instance for anything which needs to be written to the host's log.java.lang.StringpluginNameThe name used in the configuration file for this plug-in.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StatusReportergetStatusReporter()Allows reporting status information from this plug-in, such as connected/disconnected status and number of messages sent/received in each direction.abstract voidhostReady()Called some time afterstart(), when the host is ready to start receiving messages.abstract voidshutdown()Close any resources created by the connectivity plug-in, and terminate and join any background threads.abstract voidstart()Called when an entire chain has been created.
 
- 
- 
- 
Field Detail- 
CONNECTIVITY_API_VERSIONpublic static final java.lang.String CONNECTIVITY_API_VERSION A string constant containing the 4-digit version number for this API.Plug-ins should publish the API version they were compiled against by defining a public static final String constant called CONNECTIVITY_API_VERSION set to the value of this constant, e.g. 
 public static final String CONNECTIVITY_API_VERSION = com.softwareag.connectivity.ConnectivityPlugin.CONNECTIVITY_API_VERSION;- Since:
- 10.0.0
- See Also:
- Constant Field Values
 
 - 
loggerpublic final org.slf4j.Logger logger A slf4j logger to be used by this plug-in instance for anything which needs to be written to the host's log. The host will take care of adding the plug-in and chain name to the messages logged using this object.- Since:
- 9.12.0.1
 
 - 
configpublic final java.util.Map<java.lang.String,java.lang.Object> config Configuration of this plug-in. As passed into the constructor.
 - 
chainIdpublic final java.lang.String chainId The identifier used for the chain this plug-in is part of.
 - 
pluginNamepublic final java.lang.String pluginName The name used in the configuration file for this plug-in.- Since:
- 9.12.0.1
 
 - 
hostpublic final PluginHost host Interface to support miscellaneous requests from this plug-in to the host system.Cannot be used with plug-ins that use the legacy constructor. - Since:
- 10.0
 
 
- 
 - 
Method Detail- 
startpublic abstract void start() throws java.lang.ExceptionCalled when an entire chain has been created. The start method will never be called more than once on this instance.- Throws:
- java.lang.Exception- only if a fatal error occurred during startup.
 
 - 
shutdownpublic abstract void shutdown() throws java.lang.ExceptionClose any resources created by the connectivity plug-in, and terminate and join any background threads.The host will call this during host shutdown or when the chain is being destroyed dynamically for any other reason. Implementations should also ensure they work correctly even if the start() method was not called (it is especially important to consider this case when implementing transports with an associated chain manager), since if any plug-in in the chain fails to start, shutdown() will be called on all the other plug-ins to ensure an orderly cleanup of any references and/or resources. This method will never be called more than once on this instance. This method may be called while messages are still being delivered towards the host or towards the transport. If the plug-in is blocked waiting to send a message it should attempt to cancel the operation when this method is called (any messages should be discarded once shutdown has been called), and if possible should avoid returning from this method until all outstanding operations and threads have completed. - Throws:
- java.lang.Exception
 
 - 
hostReadypublic abstract void hostReady() throws java.lang.ExceptionCalled some time afterstart(), when the host is ready to start receiving messages. The host will not process messages from the plug-in until this occurs. This is advisory: the plug-in is permitted to send messages before this is called, but may opt to queue the messages until it is ready to process messages. Plug-ins may choose to not receive messages from a third party until the host is ready for them.- Throws:
- java.lang.Exception
 
 - 
getStatusReporterpublic StatusReporter getStatusReporter() Allows reporting status information from this plug-in, such as connected/disconnected status and number of messages sent/received in each direction.Cannot be used with plug-ins that use the legacy constructor. - Since:
- 10.0
 
 
- 
 
-