Package com.helger.as2lib.processor
Class AbstractMessageProcessor
java.lang.Object
com.helger.as2lib.AbstractDynamicComponent
com.helger.as2lib.processor.AbstractMessageProcessor
- All Implemented Interfaces:
IDynamicComponent
,IMessageProcessor
- Direct Known Subclasses:
AsyncMessageProcessor
,DefaultMessageProcessor
public abstract class AbstractMessageProcessor
extends AbstractDynamicComponent
implements IMessageProcessor
Abstract empty implementation of
IMessageProcessor
. It provides all
methods except
IMessageProcessor.handle(String, com.helger.as2lib.message.IMessage, java.util.Map)
.- Author:
- Philip Helger
-
Field Summary
Fields inherited from class com.helger.as2lib.AbstractDynamicComponent
m_aRWLock
Fields inherited from interface com.helger.as2lib.processor.IMessageProcessor
ATTR_PENDINGMDN, ATTR_PENDINGMDNINFO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addModule
(IProcessorModule aModule) boolean
protected final void
Execution the provided action with the registered modules.com.helger.commons.collection.impl.ICommonsList<IProcessorActiveModule>
com.helger.commons.collection.impl.ICommonsList<IProcessorModule>
<T extends IProcessorModule>
com.helger.commons.collection.impl.ICommonsList<T>getAllModulesOfClass
(Class<T> aClass) int
<T extends IProcessorModule>
TgetModuleOfClass
(Class<T> aClass) int
hashCode()
com.helger.commons.state.EChange
removeModule
(IProcessorModule aModule) void
Callstart
on all modules that implement theIProcessorActiveModule
interface.void
Callstop
on all modules that implement theIProcessorActiveModule
interface.Methods inherited from class com.helger.as2lib.AbstractDynamicComponent
attrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, initDynamicComponent, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSession, initDynamicComponent
Methods inherited from interface com.helger.as2lib.processor.IMessageProcessor
getPendingMDNFolder, getPendingMDNInfoFolder, handle, setPendingMDNFolder, setPendingMDNInfoFolder
-
Constructor Details
-
AbstractMessageProcessor
protected AbstractMessageProcessor()
-
-
Method Details
-
addModule
- Specified by:
addModule
in interfaceIMessageProcessor
-
removeModule
- Specified by:
removeModule
in interfaceIMessageProcessor
-
getModuleCount
- Specified by:
getModuleCount
in interfaceIMessageProcessor
-
getAllModules
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<IProcessorModule> getAllModules()- Specified by:
getAllModules
in interfaceIMessageProcessor
-
getModuleOfClass
- Specified by:
getModuleOfClass
in interfaceIMessageProcessor
-
getAllModulesOfClass
@Nonnull @ReturnsMutableCopy public <T extends IProcessorModule> com.helger.commons.collection.impl.ICommonsList<T> getAllModulesOfClass(@Nonnull Class<T> aClass) - Specified by:
getAllModulesOfClass
in interfaceIMessageProcessor
-
getAllActiveModules
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<IProcessorActiveModule> getAllActiveModules()- Specified by:
getAllActiveModules
in interfaceIMessageProcessor
- Returns:
- A list of all modules, that implement the
IProcessorActiveModule
interface. Nevernull
but maybe empty.
-
startActiveModules
public void startActiveModules()Description copied from interface:IMessageProcessor
Callstart
on all modules that implement theIProcessorActiveModule
interface.- Specified by:
startActiveModules
in interfaceIMessageProcessor
-
stopActiveModules
public void stopActiveModules()Description copied from interface:IMessageProcessor
Callstop
on all modules that implement theIProcessorActiveModule
interface.- Specified by:
stopActiveModules
in interfaceIMessageProcessor
-
executeAction
protected final void executeAction(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String, Object> aOptions) throws AS2ExceptionExecution the provided action with the registered modules.- Parameters:
sAction
- Action to execute. Nevernull
.aMsg
- Message it is about. Nevernull
.aOptions
- Optional options map to be used. May benull
.- Throws:
AS2Exception
- In case of error
-
equals
- Overrides:
equals
in classAbstractDynamicComponent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractDynamicComponent
-