Package org.openas2.processor
Class BaseActiveModule
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.processor.BaseProcessorModule
-
- org.openas2.processor.BaseActiveModule
-
- All Implemented Interfaces:
Component
,ActiveModule
,ProcessorModule
- Direct Known Subclasses:
BaseReceiverModule
,BaseResenderModule
public abstract class BaseActiveModule extends BaseProcessorModule implements ActiveModule
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
running
-
Constructor Summary
Constructors Constructor Description BaseActiveModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canHandle(java.lang.String action, Message msg, java.util.Map<java.lang.Object,java.lang.Object> options)
abstract void
doStart()
abstract void
doStop()
void
forceStop(java.lang.Exception cause)
void
handle(java.lang.String action, Message msg, java.util.Map<java.lang.Object,java.lang.Object> options)
abstract boolean
healthcheck(java.util.List<java.lang.String> failures)
When invoked, the module must run a self check to verify it is functioning correctly.boolean
isRunning()
private void
setRunning(boolean running)
void
start()
void
stop()
java.lang.String
toString()
-
Methods inherited from class org.openas2.BaseComponent
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, init, 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.Component
destroy, getName, getParameters, getSession, init
-
-
-
-
Method Detail
-
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interfaceActiveModule
-
doStart
public abstract void doStart() throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
doStop
public abstract void doStop() throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
healthcheck
public abstract boolean healthcheck(java.util.List<java.lang.String> failures)
Description copied from interface:ActiveModule
When 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:
healthcheck
in interfaceActiveModule
- 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
-
canHandle
public boolean canHandle(java.lang.String action, Message msg, java.util.Map<java.lang.Object,java.lang.Object> options)
- Specified by:
canHandle
in interfaceProcessorModule
-
forceStop
public void forceStop(java.lang.Exception cause)
-
handle
public void handle(java.lang.String action, Message msg, java.util.Map<java.lang.Object,java.lang.Object> options) throws OpenAS2Exception
- Specified by:
handle
in interfaceProcessorModule
- Throws:
OpenAS2Exception
-
start
public void start() throws OpenAS2Exception
- Specified by:
start
in interfaceActiveModule
- Throws:
OpenAS2Exception
-
stop
public void stop() throws OpenAS2Exception
- Specified by:
stop
in interfaceActiveModule
- Throws:
OpenAS2Exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setRunning
private void setRunning(boolean running)
-
-