Class AbstractActiveResenderModule
java.lang.Object
com.helger.as2lib.AbstractDynamicComponent
com.helger.as2lib.processor.module.AbstractProcessorModule
com.helger.as2lib.processor.module.AbstractActiveModule
com.helger.as2lib.processor.resender.AbstractActiveResenderModule
- All Implemented Interfaces:
IDynamicComponent,IProcessorActiveModule,IProcessorModule,IProcessorResenderModule
- Direct Known Subclasses:
DirectoryResenderModule,InMemoryResenderModule
public abstract class AbstractActiveResenderModule
extends AbstractActiveModule
implements IProcessorResenderModule
Base class for an active resender module.
- Author:
- OpenAS2, Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe polling interval in secondsstatic final StringThe resend delay in secondsstatic final longThe timer default polling interval of 30 seconds.static final longThe default resend delay in milliseconds (15 minutes)Fields inherited from class com.helger.as2lib.AbstractDynamicComponent
m_aRWLockFields inherited from interface com.helger.as2lib.processor.resender.IProcessorResenderModule
DEFAULT_RETRIES, DO_RESEND, DO_RESENDMDN, OPTION_CAUSE, OPTION_INITIAL_SENDER, OPTION_RESEND_ACTION, OPTION_RETRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoStart()Implement the internal start logic.voiddoStop()Implement the internal stop logic.booleanprotected final longinthashCode()voidinitDynamicComponent(IAS2Session aSession, com.helger.commons.collection.attr.IStringMap aParameters) After creating a Component object, this method should be called to set any parameters used by the component.abstract voidresend()Methods inherited from class com.helger.as2lib.processor.module.AbstractActiveModule
canHandle, forceStop, handle, isRunning, start, stop, toStringMethods inherited from class com.helger.as2lib.AbstractDynamicComponent
attrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSessionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSessionMethods inherited from interface com.helger.as2lib.processor.module.IProcessorModule
canHandle, handle
-
Field Details
-
ATTR_RESEND_DELAY_SECONDS
The resend delay in seconds- See Also:
-
ATTR_POLLING_INTERVAL_SECONDS
The polling interval in seconds- See Also:
-
DEFAULT_RESEND_DELAY_MS
public static final long DEFAULT_RESEND_DELAY_MSThe default resend delay in milliseconds (15 minutes)- See Also:
-
DEFAULT_POLLING_MS
public static final long DEFAULT_POLLING_MSThe timer default polling interval of 30 seconds.- See Also:
-
-
Constructor Details
-
AbstractActiveResenderModule
public AbstractActiveResenderModule()
-
-
Method Details
-
initDynamicComponent
@OverridingMethodsMustInvokeSuper public void initDynamicComponent(@Nonnull IAS2Session aSession, @Nullable com.helger.commons.collection.attr.IStringMap aParameters) throws AS2Exception Description copied from interface:IDynamicComponentAfter 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:
initDynamicComponentin interfaceIDynamicComponent- Overrides:
initDynamicComponentin classAbstractDynamicComponent- Parameters:
aSession- the component uses this object to access other componentsaParameters- configuration values for the component. All parameters will be stored as attributes of this component. All attributes existing before this method is called will be removed!- Throws:
AS2Exception- If an error occurs while initializing the componentAS2InvalidParameterException- If a required parameter is null in the parameters Map- See Also:
-
getResendDelayMS
- Returns:
- The defined delay until re-send in milliseconds.
- Throws:
AS2InvalidParameterException- If an invalid value is configured.
-
resend
public abstract void resend() -
doStart
Description copied from class:AbstractActiveModuleImplement the internal start logic.- Specified by:
doStartin classAbstractActiveModule- Throws:
AS2Exception- In case of an error.
-
doStop
Description copied from class:AbstractActiveModuleImplement the internal stop logic.- Specified by:
doStopin classAbstractActiveModule- Throws:
AS2Exception- In case of an error.
-
equals
- Overrides:
equalsin classAbstractActiveModule
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractActiveModule
-