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 String
The polling interval in secondsstatic final String
The resend delay in secondsstatic final long
The timer default polling interval of 30 seconds.static final long
The 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
doStart()
Implement the internal start logic.void
doStop()
Implement the internal stop logic.boolean
protected final long
int
hashCode()
void
initDynamicComponent
(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 void
resend()
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 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:IDynamicComponent
After 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:
initDynamicComponent
in interfaceIDynamicComponent
- Overrides:
initDynamicComponent
in 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:AbstractActiveModule
Implement the internal start logic.- Specified by:
doStart
in classAbstractActiveModule
- Throws:
AS2Exception
- In case of an error.
-
doStop
Description copied from class:AbstractActiveModule
Implement the internal stop logic.- Specified by:
doStop
in classAbstractActiveModule
- Throws:
AS2Exception
- In case of an error.
-
equals
- Overrides:
equals
in classAbstractActiveModule
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractActiveModule
-