Class AbstractActiveModule
java.lang.Object
com.helger.as2lib.AbstractDynamicComponent
com.helger.as2lib.processor.module.AbstractProcessorModule
com.helger.as2lib.processor.module.AbstractActiveModule
- All Implemented Interfaces:
IDynamicComponent,IProcessorActiveModule,IProcessorModule
- Direct Known Subclasses:
AbstractActiveReceiverModule,AbstractActiveResenderModule
public abstract class AbstractActiveModule
extends AbstractProcessorModule
implements IProcessorActiveModule
Abstract base implementation for
IProcessorActiveModule derived from
AbstractProcessorModule.- Author:
- Philip Helger
-
Field Summary
Fields inherited from class com.helger.as2lib.AbstractDynamicComponent
m_aRWLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this processor module can handle a certain action on the provided messageabstract voiddoStart()Implement the internal start logic.abstract voiddoStop()Implement the internal stop logic.booleanvoidvoidMain handling of the message.inthashCode()final booleanvoidstart()Start the modulevoidstop()Stop the moduletoString()Methods inherited from class com.helger.as2lib.AbstractDynamicComponent
attrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, initDynamicComponentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSession, initDynamicComponent
-
Constructor Details
-
AbstractActiveModule
public AbstractActiveModule()
-
-
Method Details
-
isRunning
public final boolean isRunning()- Specified by:
isRunningin interfaceIProcessorActiveModule- Returns:
trueof the module is running,falseif not.
-
canHandle
@OverrideOnDemand public boolean canHandle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String, Object> aOptions) Description copied from interface:IProcessorModuleCheck if this processor module can handle a certain action on the provided message- Specified by:
canHandlein interfaceIProcessorModule- Parameters:
sAction- The action to be executed. Nevernull.aMsg- The message in question. May be an AS2 message or an MDN message. Nevernull.aOptions- The options to be considered. May benull.- Returns:
trueof this module can handle the respective message,falseif not.
-
handle
public void handle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String, Object> aOptions) throws AS2ExceptionDescription copied from interface:IProcessorModuleMain handling of the message. Only called, ifIProcessorModule.canHandle(String, IMessage, Map)returnedtrue.- Specified by:
handlein interfaceIProcessorModule- Parameters:
sAction- The action to be executed. Nevernull.aMsg- The message in question. May be an AS2 message or an MDN message. Nevernull.aOptions- The options to be considered. May benull.- Throws:
AS2Exception- in case something goes wrong
-
forceStop
-
doStart
Implement the internal start logic.- Throws:
AS2Exception- In case of an error.
-
start
Description copied from interface:IProcessorActiveModuleStart the module- Specified by:
startin interfaceIProcessorActiveModule- Throws:
AS2Exception- in case starting failed
-
doStop
Implement the internal stop logic.- Throws:
AS2Exception- In case of an error.
-
stop
Description copied from interface:IProcessorActiveModuleStop the module- Specified by:
stopin interfaceIProcessorActiveModule- Throws:
AS2Exception- in case stopping failed
-
equals
- Overrides:
equalsin classAbstractDynamicComponent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractDynamicComponent
-
toString
- Overrides:
toStringin classAbstractDynamicComponent
-