|
GigaSpaces XAP 9.7.2 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 |
---|
exceptionHandler, failedEvents, processedEvents |
Fields inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
---|
beanName, logger |
Constructor Summary | |
---|---|
AbstractTemplateEventListenerContainer()
|
Method Summary | |
---|---|
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 |
isDynamicTemplate()
Returns whether dynamic template is configured |
protected boolean |
isPerformSnapshot()
|
void |
setDynamicTemplate(Object dynamicTemplate)
Called before each take and read polling operation to change the template Overrides any template defined with setTemplate(Object) |
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, getExceptionHandler, getFailedEvents, getProcessedEvents, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef, setExceptionHandler |
Methods inherited from class org.openspaces.events.AbstractSpaceListeningContainer |
---|
afterPropertiesSet, 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 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 AbstractEventListenerContainer
DataAccessException
AbstractSpaceListeningContainer.onApplicationEvent(org.springframework.context.ApplicationEvent)
public void setTemplate(Object template)
GigaSpace.take(Object,long)
protected Object getTemplate()
getReceiveTemplate()
should be used.
protected boolean isDynamicTemplate()
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()
public void setDynamicTemplate(Object dynamicTemplate)
setTemplate(Object)
templateProvider
- -
An object that implements DynamicEventTemplateProvider
or has a method annotated with DynamicEventTemplateProvider
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |