org.openspaces.events.notify
Class SimpleNotifyEventListenerContainer
java.lang.Object
org.openspaces.events.AbstractSpaceListeningContainer
org.openspaces.events.AbstractEventListenerContainer
org.openspaces.events.AbstractTemplateEventListenerContainer
org.openspaces.events.AbstractTransactionalEventListenerContainer
org.openspaces.events.notify.AbstractNotifyEventListenerContainer
org.openspaces.events.notify.SimpleNotifyEventListenerContainer
- All Implemented Interfaces:
- com.gigaspaces.internal.dump.InternalDumpProcessor, EventListener, ServiceDetailsProvider, ServiceMonitorsProvider, Aware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ApplicationListener<ApplicationEvent>, Lifecycle
public class SimpleNotifyEventListenerContainer
- extends AbstractNotifyEventListenerContainer
- implements com.gigaspaces.internal.dump.InternalDumpProcessor
A simple notification based container allowing to register a
SpaceDataEventListener
that will be triggered by notifications.
Uses AbstractNotifyEventListenerContainer
for configuration of different notification
registration parameters and transactional semantics.
The container can automatically take the notified event data (using GigaSpace.take(Object)
)
if the setPerformTakeOnNotify(boolean)
is set to true
. Defaults to
false
. If the flag is set to true
, setIgnoreEventOnNullTake(boolean)
can control of the event will be propagated to the event listener if the take operation returned
null.
- Author:
- kimchy
Methods inherited from class org.openspaces.events.notify.AbstractNotifyEventListenerContainer |
createEventSessionConfig, getBatchPendingThreshold, getBatchSize, getBatchTime, getCommType, getNotifyLeaseExpire, getNotifyMatchedUpdate, getNotifyRematchedUpdate, getNotifyTake, getNotifyUnmatched, getNotifyUpdate, getNotifyWrite, getRenewDuration, getRenewExpiration, getRenewRTT, initialize, invokeListenerWithTransaction, invokeListenerWithTransaction, isAutoRenew, isBatchEnabled, isDurable, isFifo, isGuaranteed, isNotifyAll, isNotifyLeaseExpire, isNotifyMatchedUpdate, isNotifyRematchedUpdate, isNotifyTake, isNotifyUnmatched, isNotifyUpdate, isNotifyWrite, isPassArrayAsIs, isReplicateNotifyTemplate, isTriggerNotifyTemplate, registerListener, setAutoRenew, setBatchPendingThreshold, setBatchSize, setBatchTime, setComType, setComTypeName, setDurable, setDynamicTemplate, setFifo, setGuaranteed, setLeaseListener, setListenerLease, setNotifyAll, setNotifyFilter, setNotifyLeaseExpire, setNotifyMatchedUpdate, setNotifyRematchedUpdate, setNotifyTake, setNotifyUnmatched, setNotifyUpdate, setNotifyWrite, setPassArrayAsIs, setRenewDuration, setRenewExpiration, setRenewRTT, setReplicateNotifyTemplate, setTriggerNotifyTemplate, validateConfiguration |
Methods inherited from class org.openspaces.events.AbstractEventListenerContainer |
doStart, executeListener, getActualEventListener, getApplicationContext, getEventListener, getEventListenerClass, getExceptionHandler, getFailedEvents, getProcessedEvents, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef, setExceptionHandler |
Methods inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
afterPropertiesSet, destroy, doRescheduleTask, doStop, getBeanName, getGigaSpace, getStatus, isActive, isRunning, message, onApplicationEvent, rescheduleTaskIfNecessary, setActiveWhenPrimary, setAutoStart, setBeanName, setGigaSpace, setRegisterSpaceModeListener, shutdown, start, stop, waitWhileNotRunning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleNotifyEventListenerContainer
public SimpleNotifyEventListenerContainer()
setPerformTakeOnNotify
public void setPerformTakeOnNotify(boolean performTakeOnNotify)
- If set to
true
will remove the event from the space using take operation.
Default is false
.
setIgnoreEventOnNullTake
public void setIgnoreEventOnNullTake(boolean ignoreEventOnNullTake)
- If set to
true
, will not propagate the event if the take operation returned
null
. This flag only makes sense when
setPerformTakeOnNotify(boolean)
is set to true
. Defaults to false
.
doInitialize
protected void doInitialize()
throws DataAccessException
- Description copied from class:
AbstractSpaceListeningContainer
- A callback to perform custom initialization steps.
- Specified by:
doInitialize
in class AbstractSpaceListeningContainer
- Throws:
DataAccessException
doShutdown
protected void doShutdown()
throws DataAccessException
- Description copied from class:
AbstractSpaceListeningContainer
- Perform any custom shutdown operations.
- Specified by:
doShutdown
in class AbstractSpaceListeningContainer
- Throws:
DataAccessException
- See Also:
AbstractSpaceListeningContainer.shutdown()
doAfterStart
protected void doAfterStart()
throws DataAccessException
- Overrides:
doAfterStart
in class AbstractSpaceListeningContainer
- Throws:
DataAccessException
doBeforeStop
protected void doBeforeStop()
throws DataAccessException
- Overrides:
doBeforeStop
in class AbstractSpaceListeningContainer
- Throws:
DataAccessException
registerListener
protected void registerListener()
throws DataAccessException
- Throws:
DataAccessException
closeSession
protected void closeSession()
getServicesDetails
public ServiceDetails[] getServicesDetails()
- Description copied from interface:
ServiceDetailsProvider
- Retruns one or more service details that the service exposes.
- Specified by:
getServicesDetails
in interface ServiceDetailsProvider
getServicesMonitors
public ServiceMonitors[] getServicesMonitors()
- Description copied from interface:
ServiceMonitorsProvider
- Retruns one or more service details that the service exposes.
- Specified by:
getServicesMonitors
in interface ServiceMonitorsProvider
getName
public String getName()
- Specified by:
getName
in interface com.gigaspaces.internal.dump.InternalDumpProcessor
process
public void process(com.gigaspaces.internal.dump.InternalDump dump)
throws com.gigaspaces.internal.dump.InternalDumpProcessorFailedException
- Specified by:
process
in interface com.gigaspaces.internal.dump.InternalDumpProcessor
- Throws:
com.gigaspaces.internal.dump.InternalDumpProcessorFailedException
Copyright © GigaSpaces.