|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.events.AbstractSpaceListeningContainer org.openspaces.events.AbstractEventListenerContainer org.openspaces.events.AbstractTemplateEventListenerContainer
public abstract class AbstractTemplateEventListenerContainer
A simple base class that provides support methods for Template based event listeners.
There are several ways a template can be provided. The first is by explicitly setting it using
setTemplate(Object)
. The second option is for the event listener to implement an interface
called EventTemplateProvider
. The last option is to annotate a method
within the event listener that will return the actual template using EventTemplate
annotation.
Field Summary |
---|
Fields inherited from class org.openspaces.events.AbstractEventListenerContainer |
---|
failedEvents, processedEvents |
Fields inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
---|
beanName, logger |
Constructor Summary | |
---|---|
AbstractTemplateEventListenerContainer()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Delegates to AbstractSpaceListeningContainer.validateConfiguration() and AbstractSpaceListeningContainer.initialize() . |
protected Object |
getReceiveTemplate()
Returns the template to be used for receive operations. |
protected Object |
getTemplate()
Returns the template that will be used. |
void |
initialize()
Initialize this container. |
protected boolean |
isPerformSnapshot()
|
void |
setPerformSnapshot(boolean performSnapshot)
If set to true will perform snapshot operation on the provided template
before invoking registering as an event listener. |
void |
setTemplate(Object template)
Sets the specified template to be used with the polling space operation. |
Methods inherited from class org.openspaces.events.AbstractEventListenerContainer |
---|
doStart, executeListener, getActualEventListener, getApplicationContext, getEventListener, getEventListenerClass, getFailedEvents, getProcessedEvents, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef |
Methods inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
---|
destroy, doAfterStart, doBeforeStop, doInitialize, doRescheduleTask, doShutdown, doStop, getBeanName, getGigaSpace, getStatus, isActive, isRunning, message, onApplicationEvent, rescheduleTaskIfNecessary, setActiveWhenPrimary, setAutoStart, setBeanName, setGigaSpace, setRegisterSpaceModeListener, shutdown, start, stop, validateConfiguration, waitWhileNotRunning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openspaces.pu.service.ServiceDetailsProvider |
---|
getServicesDetails |
Methods inherited from interface org.openspaces.pu.service.ServiceMonitorsProvider |
---|
getServicesMonitors |
Constructor Detail |
---|
public AbstractTemplateEventListenerContainer()
Method Detail |
---|
public void afterPropertiesSet()
AbstractSpaceListeningContainer
AbstractSpaceListeningContainer.validateConfiguration()
and AbstractSpaceListeningContainer.initialize()
.
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class AbstractSpaceListeningContainer
public void initialize() throws DataAccessException
AbstractSpaceListeningContainer
true
will call AbstractSpaceListeningContainer.doStart()
(if it is set to true
,
lifecycle of the container will be controlled by the current space mode).
AbstractSpaceListeningContainer.doInitialize()
will be called for additional initialization after the possible
AbstractSpaceListeningContainer.doStart()
call.
initialize
in class AbstractSpaceListeningContainer
DataAccessException
AbstractSpaceListeningContainer.onApplicationEvent(org.springframework.context.ApplicationEvent)
public void setTemplate(Object template)
GigaSpace.take(Object,long)
protected Object getTemplate()
getReceiveTemplate()
should be used.
protected Object getReceiveTemplate()
setPerformSnapshot(boolean)
is set to true
(the default)
will return the snapshot of the provided template.
public void setPerformSnapshot(boolean performSnapshot)
true
will perform snapshot operation on the provided template
before invoking registering as an event listener.
GigaSpace.snapshot(Object)
protected boolean isPerformSnapshot()
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |