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 ofIMessageProcessor. It provides all methods exceptIMessageProcessor.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
Constructors Modifier Constructor Description protectedAbstractMessageProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModule(IProcessorModule aModule)booleanequals(Object o)protected voidexecuteAction(String sAction, IMessage aMsg, Map<String,Object> aOptions)Execution the provided action with the registered modules.com.helger.commons.collection.impl.ICommonsList<IProcessorActiveModule>getAllActiveModules()com.helger.commons.collection.impl.ICommonsList<IProcessorModule>getAllModules()<T extends IProcessorModule>
com.helger.commons.collection.impl.ICommonsList<T>getAllModulesOfClass(Class<T> aClass)intgetModuleCount()<T extends IProcessorModule>
TgetModuleOfClass(Class<T> aClass)inthashCode()com.helger.commons.state.EChangeremoveModule(IProcessorModule aModule)voidstartActiveModules()Callstarton all modules that implement theIProcessorActiveModuleinterface.voidstopActiveModules()Callstopon all modules that implement theIProcessorActiveModuleinterface.-
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
-
-
-
-
Method Detail
-
addModule
public void addModule(@Nonnull IProcessorModule aModule)
- Specified by:
addModulein interfaceIMessageProcessor
-
removeModule
@Nonnull public com.helger.commons.state.EChange removeModule(@Nullable IProcessorModule aModule)
- Specified by:
removeModulein interfaceIMessageProcessor
-
getModuleCount
@Nonnegative public int getModuleCount()
- Specified by:
getModuleCountin interfaceIMessageProcessor
-
getAllModules
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<IProcessorModule> getAllModules()
- Specified by:
getAllModulesin interfaceIMessageProcessor
-
getModuleOfClass
@Nullable public <T extends IProcessorModule> T getModuleOfClass(@Nonnull Class<T> aClass)
- Specified by:
getModuleOfClassin interfaceIMessageProcessor
-
getAllModulesOfClass
@Nonnull @ReturnsMutableCopy public <T extends IProcessorModule> com.helger.commons.collection.impl.ICommonsList<T> getAllModulesOfClass(@Nonnull Class<T> aClass)
- Specified by:
getAllModulesOfClassin interfaceIMessageProcessor
-
getAllActiveModules
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<IProcessorActiveModule> getAllActiveModules()
- Specified by:
getAllActiveModulesin interfaceIMessageProcessor- Returns:
- A list of all modules, that implement the
IProcessorActiveModuleinterface. Nevernullbut maybe empty.
-
startActiveModules
public void startActiveModules()
Description copied from interface:IMessageProcessorCallstarton all modules that implement theIProcessorActiveModuleinterface.- Specified by:
startActiveModulesin interfaceIMessageProcessor
-
stopActiveModules
public void stopActiveModules()
Description copied from interface:IMessageProcessorCallstopon all modules that implement theIProcessorActiveModuleinterface.- Specified by:
stopActiveModulesin interfaceIMessageProcessor
-
executeAction
protected final void executeAction(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions) throws AS2Exception
Execution 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
public boolean equals(Object o)
- Overrides:
equalsin classAbstractDynamicComponent
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractDynamicComponent
-
-