GigaSpaces XAP 9.7.2 API

org.openspaces.events.polling
Class SimplePollingContainerConfigurer

java.lang.Object
  extended by org.openspaces.events.polling.SimplePollingContainerConfigurer

public class SimplePollingContainerConfigurer
extends Object

A simplified programmatic configuration that for SimplePollingEventListenerContainer.

Sample usage:

 UrlSpaceConfigurer urlSpaceConfigurerPrimary = new UrlSpaceConfigurer("/./space");
 GigaSpace gigaSpace = new GigaSpaceConfigurer(urlSpaceConfigurerPrimary.space()).gigaSpace();
 SimplePollingEventListenerContainer pollingEventListenerContainer = new SimplePollingContainerConfigurer(gigaSpace)
              .template(new TestMessage())
              .eventListenerAnnotation(new Object() {
                  @SpaceDataEvent public void gotMeselfAnEvent() {
                      // do something
                  }
              }).notifyContainer();

 ...

 pollingEventListenerContainer.destroy();
 urlSpaceConfigurerPrimary.destroy();
 

Author:
kimchy

Constructor Summary
SimplePollingContainerConfigurer(GigaSpace gigaSpace)
           
 
Method Summary
 SimplePollingContainerConfigurer activeWhenPrimary(boolean activeWhenPrimary)
           
 SimplePollingContainerConfigurer autoStart(boolean autoStart)
           
 SimplePollingContainerConfigurer concurrentConsumers(int concurrentConsumers)
           
 SimplePollingEventListenerContainer create()
          Creates a new SimplePollingEventListenerContainer instance.
 SimplePollingContainerConfigurer dynamicTemplate(DynamicEventTemplateProvider templateProvider)
           
 SimplePollingContainerConfigurer dynamicTemplateAnnotation(Object templateProvider)
           
 SimplePollingContainerConfigurer dynamicTemplateMethod(Object templateProvider, String methodName)
           
 SimplePollingContainerConfigurer eventListener(SpaceDataEventListener eventListener)
           
 SimplePollingContainerConfigurer eventListenerAnnotation(Object eventListener)
          Sets an event listener that uses annotations
 SimplePollingContainerConfigurer eventListenerMethod(Object eventListener, String methodName)
          Sets an event listener that uses method name as an adapter
 SimplePollingContainerConfigurer exceptionHandler(EventExceptionHandler exceptionHandler)
           
 SimplePollingContainerConfigurer idleTaskExecutionLimit(int idleTaskExecutionLimit)
           
 SimplePollingContainerConfigurer maxConcurrentConsumers(int maxConcurrentConsumers)
           
 SimplePollingContainerConfigurer maxEventsPerTask(int maxEventsPerTask)
           
 SimplePollingContainerConfigurer name(String name)
           
 SimplePollingContainerConfigurer passArrayAsIs(boolean passArrayAsIs)
           
 SimplePollingContainerConfigurer performSnapshot(boolean performSnapshot)
           
 SimplePollingEventListenerContainer pollingContainer()
          Creates a new SimplePollingEventListenerContainer instance.
 SimplePollingContainerConfigurer receiveOperationHandler(ReceiveOperationHandler receiveOperationHandler)
           
 SimplePollingContainerConfigurer receiveTimeout(long receiveTimeout)
           
 SimplePollingContainerConfigurer recoveryInterval(long recoveryInterval)
           
 SimplePollingContainerConfigurer taskExecutor(TaskExecutor taskExecutor)
           
 SimplePollingContainerConfigurer template(Object template)
           
 SimplePollingContainerConfigurer transactionIsolationLevel(int transactionIsolationLevel)
           
 SimplePollingContainerConfigurer transactionManager(PlatformTransactionManager transactionManager)
           
 SimplePollingContainerConfigurer transactionName(String transactionName)
           
 SimplePollingContainerConfigurer transactionTimeout(int transactionTimeout)
           
 SimplePollingContainerConfigurer triggerOperationHandler(TriggerOperationHandler triggerOperationHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePollingContainerConfigurer

public SimplePollingContainerConfigurer(GigaSpace gigaSpace)
Method Detail

name

public SimplePollingContainerConfigurer name(String name)

taskExecutor

public SimplePollingContainerConfigurer taskExecutor(TaskExecutor taskExecutor)
See Also:
SimplePollingEventListenerContainer.setTaskExecutor(org.springframework.core.task.TaskExecutor)

recoveryInterval

public SimplePollingContainerConfigurer recoveryInterval(long recoveryInterval)
See Also:
SimplePollingEventListenerContainer.setRecoveryInterval(long)

concurrentConsumers

public SimplePollingContainerConfigurer concurrentConsumers(int concurrentConsumers)
See Also:
SimplePollingEventListenerContainer.setConcurrentConsumers(int)

maxConcurrentConsumers

public SimplePollingContainerConfigurer maxConcurrentConsumers(int maxConcurrentConsumers)
See Also:
SimplePollingEventListenerContainer.setMaxConcurrentConsumers(int)

maxEventsPerTask

public SimplePollingContainerConfigurer maxEventsPerTask(int maxEventsPerTask)
See Also:
SimplePollingEventListenerContainer.setMaxEventsPerTask(int)

idleTaskExecutionLimit

public SimplePollingContainerConfigurer idleTaskExecutionLimit(int idleTaskExecutionLimit)
See Also:
SimplePollingEventListenerContainer.setIdleTaskExecutionLimit(int)

passArrayAsIs

public SimplePollingContainerConfigurer passArrayAsIs(boolean passArrayAsIs)
See Also:
AbstractPollingEventListenerContainer.setPassArrayAsIs(boolean)

receiveTimeout

public SimplePollingContainerConfigurer receiveTimeout(long receiveTimeout)
See Also:
AbstractPollingEventListenerContainer.setReceiveTimeout(long)

receiveOperationHandler

public SimplePollingContainerConfigurer receiveOperationHandler(ReceiveOperationHandler receiveOperationHandler)
See Also:
AbstractPollingEventListenerContainer.setReceiveOperationHandler(org.openspaces.events.polling.receive.ReceiveOperationHandler)

triggerOperationHandler

public SimplePollingContainerConfigurer triggerOperationHandler(TriggerOperationHandler triggerOperationHandler)
See Also:
AbstractPollingEventListenerContainer.setTriggerOperationHandler(org.openspaces.events.polling.trigger.TriggerOperationHandler)

template

public SimplePollingContainerConfigurer template(Object template)
See Also:
AbstractTemplateEventListenerContainer.setTemplate(Object)

performSnapshot

public SimplePollingContainerConfigurer performSnapshot(boolean performSnapshot)
See Also:
AbstractTemplateEventListenerContainer.setPerformSnapshot(boolean)

transactionManager

public SimplePollingContainerConfigurer transactionManager(PlatformTransactionManager transactionManager)
See Also:
AbstractTransactionalEventListenerContainer.setTransactionManager(org.springframework.transaction.PlatformTransactionManager)

transactionName

public SimplePollingContainerConfigurer transactionName(String transactionName)
See Also:
AbstractTransactionalEventListenerContainer.setTransactionName(String)

transactionTimeout

public SimplePollingContainerConfigurer transactionTimeout(int transactionTimeout)
See Also:
AbstractTransactionalEventListenerContainer.setTransactionTimeout(int)

transactionIsolationLevel

public SimplePollingContainerConfigurer transactionIsolationLevel(int transactionIsolationLevel)
See Also:
AbstractTransactionalEventListenerContainer.setTransactionIsolationLevel(int)

exceptionHandler

public SimplePollingContainerConfigurer exceptionHandler(EventExceptionHandler exceptionHandler)
See Also:
AbstractEventListenerContainer.setExceptionHandler(org.openspaces.events.EventExceptionHandler)

eventListener

public SimplePollingContainerConfigurer eventListener(SpaceDataEventListener eventListener)
See Also:
AbstractEventListenerContainer.setEventListener(org.openspaces.events.SpaceDataEventListener)

eventListenerAnnotation

public SimplePollingContainerConfigurer eventListenerAnnotation(Object eventListener)
Sets an event listener that uses annotations

See Also:
AbstractEventListenerContainer.setEventListener(org.openspaces.events.SpaceDataEventListener), AnnotationEventListenerAdapter

eventListenerMethod

public SimplePollingContainerConfigurer eventListenerMethod(Object eventListener,
                                                            String methodName)
Sets an event listener that uses method name as an adapter

See Also:
AbstractEventListenerContainer.setEventListener(org.openspaces.events.SpaceDataEventListener), MethodEventListenerAdapter

activeWhenPrimary

public SimplePollingContainerConfigurer activeWhenPrimary(boolean activeWhenPrimary)
See Also:
AbstractSpaceListeningContainer.setActiveWhenPrimary(boolean)

autoStart

public SimplePollingContainerConfigurer autoStart(boolean autoStart)
See Also:
AbstractSpaceListeningContainer.setAutoStart(boolean)

dynamicTemplate

public SimplePollingContainerConfigurer dynamicTemplate(DynamicEventTemplateProvider templateProvider)
See Also:
org.openspaces.events.polling.SimplePollingEventListenerContainer#setTemplateProvider()

dynamicTemplateMethod

public SimplePollingContainerConfigurer dynamicTemplateMethod(Object templateProvider,
                                                              String methodName)
See Also:
org.openspaces.events.adapter.MethodTemplateProviderAdapter

dynamicTemplateAnnotation

public SimplePollingContainerConfigurer dynamicTemplateAnnotation(Object templateProvider)
See Also:
AnnotationDynamicEventTemplateProviderAdapter

create

public SimplePollingEventListenerContainer create()
Creates a new SimplePollingEventListenerContainer instance.


pollingContainer

public SimplePollingEventListenerContainer pollingContainer()
Creates a new SimplePollingEventListenerContainer instance.

See Also:
create()

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.