public abstract class AbstractActivePollingModule extends AbstractActiveReceiverModule
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_POLLING_INTERVAL
The interval in seconds
|
m_aRWLock| Constructor and Description |
|---|
AbstractActivePollingModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
doStart()
Implement the internal start logic.
|
void |
doStop()
Implement the internal stop logic.
|
long |
getInterval() |
void |
initDynamicComponent(IAS2Session aSession,
com.helger.commons.collection.attr.IStringMap aOptions)
After creating a Component object, this method should be called to set any
parameters used by the component.
|
boolean |
isBusy() |
abstract void |
poll()
The abstract message that is called in the defined interval and needs to be
overridden by subclasses.
|
void |
setInterval(long nSeconds)
Set the interval in seconds.
|
canHandle, equals, forceStop, handle, hashCode, isRunning, start, stop, toStringattrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSessionclone, finalize, getClass, notify, notifyAll, wait, wait, waitisRunning, start, stopcanHandle, handleattrs, getName, getSessionpublic static final String ATTR_POLLING_INTERVAL
@OverridingMethodsMustInvokeSuper public void initDynamicComponent(@Nonnull IAS2Session aSession, @Nullable com.helger.commons.collection.attr.IStringMap aOptions) throws AS2Exception
IDynamicComponentinitDynamicComponent in interface IDynamicComponentinitDynamicComponent in class AbstractDynamicComponentaSession - the component uses this object to access other componentsaOptions - 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!AS2Exception - If an error occurs while initializing the componentAS2InvalidParameterException - If a required parameter is null in the parameters MapIAS2Sessionpublic void setInterval(long nSeconds)
nSeconds - Seconds to wait between polling.@CheckForSigned public long getInterval()
public final boolean isBusy()
public abstract void poll()
public void doStart()
throws AS2Exception
AbstractActiveModuledoStart in class AbstractActiveModuleAS2Exception - In case of an error.public void doStop()
throws AS2Exception
AbstractActiveModuledoStop in class AbstractActiveModuleAS2Exception - In case of an error.Copyright © 2013–2022 Philip Helger. All rights reserved.