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
,Serializable
- Direct Known Subclasses:
DirectoryResenderModule
,InMemoryResenderModule
public abstract class AbstractActiveResenderModule extends AbstractActiveModule implements IProcessorResenderModule
Base class for an active resender module.- Author:
- OpenAS2, Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_POLLING_INTERVAL_SECONDS
The polling interval in secondsstatic String
ATTR_RESEND_DELAY_SECONDS
The resend delay in secondsstatic long
DEFAULT_POLLING_MS
The timer default polling interval of 30 seconds.static long
DEFAULT_RESEND_DELAY_MS
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 Constructor Description AbstractActiveResenderModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doStart()
Implement the internal start logic.void
doStop()
Implement the internal stop logic.boolean
equals(Object o)
protected long
getResendDelayMS()
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 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: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:
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:AbstractActiveModule
Implement the internal start logic.- Specified by:
doStart
in classAbstractActiveModule
- Throws:
AS2Exception
- In case of an error.
-
doStop
@OverridingMethodsMustInvokeSuper public void doStop() throws AS2Exception
Description copied from class:AbstractActiveModule
Implement the internal stop logic.- Specified by:
doStop
in classAbstractActiveModule
- Throws:
AS2Exception
- In case of an error.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractActiveModule
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractActiveModule
-
-