Package org.openas2.processor.receiver
Class NetModule
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.processor.BaseProcessorModule
-
- org.openas2.processor.BaseActiveModule
-
- org.openas2.processor.receiver.BaseReceiverModule
-
- org.openas2.processor.receiver.NetModule
-
- All Implemented Interfaces:
Component,ActiveModule,ProcessorModule,ReceiverModule
- Direct Known Subclasses:
AS2MDNReceiverModule,AS2ReceiverModule,HealthCheckModule
public abstract class NetModule extends BaseReceiverModule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classNetModule.ConnectionHandlerprotected classNetModule.HTTPServerThread
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ERRORSstatic java.lang.StringPARAM_ADDRESSstatic java.lang.StringPARAM_ERROR_DIRECTORYstatic java.lang.StringPARAM_ERRORSstatic java.lang.StringPARAM_PORTstatic java.lang.StringPARAM_PROTOCOLstatic java.lang.StringPARAM_SSL_KEYSTOREstatic java.lang.StringPARAM_SSL_KEYSTORE_PASSWORDstatic java.lang.StringPARAM_SSL_PROTOCOL
-
Constructor Summary
Constructors Constructor Description NetModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddoStart()voiddoStop()protected abstract NetModuleHandlergetHandler()protected voidhandleError(Message msg, OpenAS2Exception oae)booleanhealthcheck(java.util.List<java.lang.String> failures)When invoked, the module must run a self check to verify it is functioning correctly.voidinit(Session session, java.util.Map<java.lang.String,java.lang.String> options)Component lifecycle hook.-
Methods inherited from class org.openas2.processor.BaseActiveModule
canHandle, forceStop, handle, isRunning, start, stop, toString
-
Methods inherited from class org.openas2.BaseComponent
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openas2.processor.ActiveModule
isRunning, start, stop
-
Methods inherited from interface org.openas2.Component
destroy, getName, getParameters, getSession
-
Methods inherited from interface org.openas2.processor.ProcessorModule
canHandle, handle
-
-
-
-
Field Detail
-
PARAM_ADDRESS
public static final java.lang.String PARAM_ADDRESS
- See Also:
- Constant Field Values
-
PARAM_PORT
public static final java.lang.String PARAM_PORT
- See Also:
- Constant Field Values
-
PARAM_PROTOCOL
public static final java.lang.String PARAM_PROTOCOL
- See Also:
- Constant Field Values
-
PARAM_SSL_KEYSTORE
public static final java.lang.String PARAM_SSL_KEYSTORE
- See Also:
- Constant Field Values
-
PARAM_SSL_KEYSTORE_PASSWORD
public static final java.lang.String PARAM_SSL_KEYSTORE_PASSWORD
- See Also:
- Constant Field Values
-
PARAM_SSL_PROTOCOL
public static final java.lang.String PARAM_SSL_PROTOCOL
- See Also:
- Constant Field Values
-
PARAM_ERROR_DIRECTORY
public static final java.lang.String PARAM_ERROR_DIRECTORY
- See Also:
- Constant Field Values
-
PARAM_ERRORS
public static final java.lang.String PARAM_ERRORS
- See Also:
- Constant Field Values
-
DEFAULT_ERRORS
public static final java.lang.String DEFAULT_ERRORS
- See Also:
- Constant Field Values
-
-
Method Detail
-
doStart
public void doStart() throws OpenAS2Exception- Specified by:
doStartin classBaseActiveModule- Throws:
OpenAS2Exception
-
doStop
public void doStop() throws OpenAS2Exception- Specified by:
doStopin classBaseActiveModule- Throws:
OpenAS2Exception
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> options) throws OpenAS2Exception
Description copied from interface:ComponentComponent lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
initin interfaceComponent- Overrides:
initin classBaseComponent- Parameters:
session- the component uses this object to access other componentsoptions- configuration values for the component- Throws:
OpenAS2Exception- If an error occurs while initializing the component- See Also:
Session
-
healthcheck
public boolean healthcheck(java.util.List<java.lang.String> failures)
Description copied from interface:ActiveModuleWhen invoked, the module must run a self check to verify it is functioning correctly. Any failures must be reported in the failures list passed in to the method by the callee- Specified by:
healthcheckin interfaceActiveModule- Specified by:
healthcheckin classBaseActiveModule- Parameters:
failures- - a list of failures if any occur- Returns:
- - true if module has no problems otherwise false ith failure messages in passed in List
-
getHandler
protected abstract NetModuleHandler getHandler()
-
handleError
protected void handleError(Message msg, OpenAS2Exception oae)
-
-