|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openspaces.events.AbstractSpaceListeningContainer
org.openspaces.events.AbstractEventListenerContainer
org.openspaces.events.AbstractTemplateEventListenerContainer
org.openspaces.events.notify.AbstractNotifyEventListenerContainer
org.openspaces.events.notify.SimpleNotifyEventListenerContainer
public class SimpleNotifyEventListenerContainer
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.
Allows to control using setRegisterOnStartup(boolean)
if the listener will be registered
for notification on startup or registration will be controlled by the AbstractEventListenerContainer.doStart()
and
AbstractSpaceListeningContainer.doStop()
callbacks (which by default are triggered based on the current space mode -
PRIMARY
or BACKUP
). Default is false
which means
registration will occur when the space moves into PRIMARY
mode (assuming that
AbstractSpaceListeningContainer.setActiveWhenPrimary(boolean)
is set to true
, which is the default).
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.
Field Summary |
---|
Fields inherited from class org.openspaces.events.notify.AbstractNotifyEventListenerContainer |
---|
COM_TYPE_MULTICAST, COM_TYPE_MULTIPLEX, COM_TYPE_PREFIX, COM_TYPE_UNICAST |
Fields inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
---|
logger |
Constructor Summary | |
---|---|
SimpleNotifyEventListenerContainer()
|
Method Summary | |
---|---|
protected void |
closeSession()
|
protected void |
doAfterStart()
|
protected void |
doBeforeStop()
|
protected void |
doInitialize()
Register any invokers within this container. |
protected void |
doShutdown()
Close the registered invokers. |
protected void |
registerListener()
|
void |
setIgnoreEventOnNullTake(boolean ignoreEventOnNullTake)
If set to true , will not propagate the event if the take operation returned
null . |
void |
setPerformTakeOnNotify(boolean performTakeOnNotify)
If set to true will remove the event from the space using take operation. |
void |
setRegisterOnStartup(boolean registerOnStartup)
|
Methods inherited from class org.openspaces.events.AbstractTemplateEventListenerContainer |
---|
afterPropertiesSet, getReceiveTemplate, getTemplate, setPerformSnapshot, setTemplate |
Methods inherited from class org.openspaces.events.AbstractEventListenerContainer |
---|
doStart, executeListener, getActualEventListener, getApplicationContext, getEventListener, getEventListenerClass, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef |
Methods inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
---|
destroy, doRescheduleTask, doStop, getBeanName, getGigaSpace, 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 |
Constructor Detail |
---|
public SimpleNotifyEventListenerContainer()
Method Detail |
---|
public void setRegisterOnStartup(boolean registerOnStartup)
public void setPerformTakeOnNotify(boolean performTakeOnNotify)
true
will remove the event from the space using take operation.
Default is false
.
public void setIgnoreEventOnNullTake(boolean ignoreEventOnNullTake)
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
.
protected void doInitialize() throws DataAccessException
AbstractSpaceListeningContainer
Subclasses need to implement this method for their specific invoker management process.
doInitialize
in class AbstractSpaceListeningContainer
DataAccessException
protected void doShutdown() throws DataAccessException
AbstractSpaceListeningContainer
Subclasses need to implement this method for their specific invoker management process.
doShutdown
in class AbstractSpaceListeningContainer
DataAccessException
AbstractSpaceListeningContainer.shutdown()
protected void doAfterStart() throws DataAccessException
doAfterStart
in class AbstractSpaceListeningContainer
DataAccessException
protected void doBeforeStop() throws DataAccessException
doBeforeStop
in class AbstractSpaceListeningContainer
DataAccessException
protected void registerListener() throws DataAccessException
DataAccessException
protected void closeSession()
|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |