GigaSpaces XAP 9.7.2 API

org.openspaces.events.asyncpolling
Class SimpleAsyncPollingContainerConfigurer

java.lang.Object
  extended by org.openspaces.events.asyncpolling.SimpleAsyncPollingContainerConfigurer

public class SimpleAsyncPollingContainerConfigurer
extends Object

A simplified programmatic configuration that for SimpleAsyncPollingEventListenerContainer.

Sample usage:

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

 ...

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

Author:
kimchy
See Also:
SimpleAsyncPollingEventListenerContainer

Constructor Summary
SimpleAsyncPollingContainerConfigurer(GigaSpace gigaSpace)
           
 
Method Summary
 SimpleAsyncPollingContainerConfigurer activeWhenPrimary(boolean activeWhenPrimary)
           
 SimpleAsyncPollingContainerConfigurer asyncOperationHandler(AsyncOperationHandler operationHandler)
           
 SimpleAsyncPollingContainerConfigurer autoStart(boolean autoStart)
           
 SimpleAsyncPollingContainerConfigurer concurrentConsumers(int concurrentConsumers)
           
 SimpleAsyncPollingEventListenerContainer create()
          Creates a new SimpleAsyncPollingEventListenerContainer instance.
 SimpleAsyncPollingContainerConfigurer dynamicTemplate(DynamicEventTemplateProvider templateProvider)
           
 SimpleAsyncPollingContainerConfigurer dynamicTemplateAnnotation(Object templateProvider)
           
 SimpleAsyncPollingContainerConfigurer dynamicTemplateMethod(Object templateProvider, String methodName)
           
 SimpleAsyncPollingContainerConfigurer eventListener(SpaceDataEventListener eventListener)
           
 SimpleAsyncPollingContainerConfigurer eventListenerAnnotation(Object eventListener)
          Sets an event listener that uses annotations
 SimpleAsyncPollingContainerConfigurer eventListenerMethod(Object eventListener, String methodName)
          Sets an event listener that uses method name as an adapter
 SimpleAsyncPollingContainerConfigurer exceptionHandler(EventExceptionHandler exceptionHandler)
           
 SimpleAsyncPollingContainerConfigurer name(String name)
           
 SimpleAsyncPollingContainerConfigurer performSnapshot(boolean performSnapshot)
           
 SimpleAsyncPollingEventListenerContainer pollingContainer()
          Creates a new SimpleAsyncPollingEventListenerContainer instance.
 SimpleAsyncPollingContainerConfigurer receiveTimeout(long receiveTimeout)
           
 SimpleAsyncPollingContainerConfigurer template(Object template)
           
 SimpleAsyncPollingContainerConfigurer transactionIsolationLevel(int transactionIsolationLevel)
           
 SimpleAsyncPollingContainerConfigurer transactionManager(PlatformTransactionManager transactionManager)
           
 SimpleAsyncPollingContainerConfigurer transactionName(String transactionName)
           
 SimpleAsyncPollingContainerConfigurer transactionTimeout(int transactionTimeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAsyncPollingContainerConfigurer

public SimpleAsyncPollingContainerConfigurer(GigaSpace gigaSpace)
Method Detail

name

public SimpleAsyncPollingContainerConfigurer name(String name)
See Also:
AbstractSpaceListeningContainer.setBeanName(String)

concurrentConsumers

public SimpleAsyncPollingContainerConfigurer concurrentConsumers(int concurrentConsumers)
See Also:
SimpleAsyncPollingEventListenerContainer.setConcurrentConsumers(int)

receiveTimeout

public SimpleAsyncPollingContainerConfigurer receiveTimeout(long receiveTimeout)
See Also:
SimpleAsyncPollingEventListenerContainer.setReceiveTimeout(long)

asyncOperationHandler

public SimpleAsyncPollingContainerConfigurer asyncOperationHandler(AsyncOperationHandler operationHandler)

template

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

performSnapshot

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

transactionManager

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

transactionName

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

transactionTimeout

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

transactionIsolationLevel

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

exceptionHandler

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

eventListener

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

eventListenerAnnotation

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

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

eventListenerMethod

public SimpleAsyncPollingContainerConfigurer 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 SimpleAsyncPollingContainerConfigurer activeWhenPrimary(boolean activeWhenPrimary)
See Also:
AbstractSpaceListeningContainer.setActiveWhenPrimary(boolean)

autoStart

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

dynamicTemplate

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

dynamicTemplateMethod

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

dynamicTemplateAnnotation

public SimpleAsyncPollingContainerConfigurer dynamicTemplateAnnotation(Object templateProvider)
See Also:
AnnotationDynamicEventTemplateProviderAdapter

create

public SimpleAsyncPollingEventListenerContainer create()
Creates a new SimpleAsyncPollingEventListenerContainer instance.


pollingContainer

public SimpleAsyncPollingEventListenerContainer pollingContainer()
Creates a new SimpleAsyncPollingEventListenerContainer instance.

See Also:
create()

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.