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
Fields Modifier and Type Field Description static StringATTR_POLLING_INTERVAL_SECONDSThe polling interval in secondsstatic StringATTR_RESEND_DELAY_SECONDSThe resend delay in secondsstatic longDEFAULT_POLLING_MSThe timer default polling interval of 30 seconds.static longDEFAULT_RESEND_DELAY_MSThe default resend delay in milliseconds (15 minutes)-
Fields inherited from class com.helger.as2lib.AbstractDynamicComponent
m_aRWLock
-
Fields 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 Constructor Description AbstractActiveResenderModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddoStart()Implement the internal start logic.voiddoStop()Implement the internal stop logic.booleanequals(Object o)protected longgetResendDelayMS()inthashCode()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, toString
-
Methods inherited from class com.helger.as2lib.AbstractDynamicComponent
attrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession
-
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
-
Methods inherited from interface com.helger.as2lib.processor.module.IProcessorModule
canHandle, handle
-
-
-
-
Field Detail
-
ATTR_RESEND_DELAY_SECONDS
public static final String ATTR_RESEND_DELAY_SECONDS
The resend delay in seconds- See Also:
- Constant Field Values
-
ATTR_POLLING_INTERVAL_SECONDS
public static final String ATTR_POLLING_INTERVAL_SECONDS
The polling interval in seconds- See Also:
- Constant Field Values
-
DEFAULT_RESEND_DELAY_MS
public static final long DEFAULT_RESEND_DELAY_MS
The default resend delay in milliseconds (15 minutes)- See Also:
- Constant Field Values
-
DEFAULT_POLLING_MS
public static final long DEFAULT_POLLING_MS
The timer default polling interval of 30 seconds.- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
IAS2Session
-
getResendDelayMS
@Nonnegative protected final long getResendDelayMS() throws AS2InvalidParameterException
- Returns:
- The defined delay until re-send in milliseconds.
- Throws:
AS2InvalidParameterException- If an invalid value is configured.
-
resend
public abstract void resend()
-
doStart
@OverridingMethodsMustInvokeSuper public void doStart() throws AS2Exception
Description copied from class:AbstractActiveModuleImplement the internal start logic.- Specified by:
doStartin classAbstractActiveModule- Throws:
AS2Exception- In case of an error.
-
doStop
@OverridingMethodsMustInvokeSuper public void doStop() throws AS2Exception
Description copied from class:AbstractActiveModuleImplement the internal stop logic.- Specified by:
doStopin classAbstractActiveModule- Throws:
AS2Exception- In case of an error.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractActiveModule
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractActiveModule
-
-