com.atlassian.event
Class AsyncEventManager

java.lang.Object
  extended by com.atlassian.event.DefaultEventManager
      extended by com.atlassian.event.AsyncEventManager
All Implemented Interfaces:
EventManager, java.util.EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class AsyncEventManager
extends DefaultEventManager

A basica EventManager that executes the EventListener.handleEvent(Event) asynchronously (in a thread pool)


Field Summary
 
Fields inherited from class com.atlassian.event.DefaultEventManager
applicationContext, executor, globalListeners, listenersByClass, listenersByKey
 
Constructor Summary
AsyncEventManager()
          Uses a ThreadPoolExecutor a thread pool with various defaults
AsyncEventManager(int corePoolSize, int maximumPoolSize, long keepAliveSeconds, java.util.concurrent.ThreadFactory threadFactory)
          Allows for users to tweak the ThreadPoolExecutor
AsyncEventManager(java.util.concurrent.ThreadFactory threadFactory)
           
 
Method Summary
 java.util.concurrent.ExecutorService getExecutorService()
           
 
Methods inherited from class com.atlassian.event.DefaultEventManager
handleEventListener, onApplicationEvent, publishEvent, registerListener, setApplicationContext, setDefaultListeners, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncEventManager

public AsyncEventManager(int corePoolSize,
                         int maximumPoolSize,
                         long keepAliveSeconds,
                         java.util.concurrent.ThreadFactory threadFactory)
Allows for users to tweak the ThreadPoolExecutor

Parameters:
corePoolSize - - minimum threads
maximumPoolSize - - maximum threads
keepAliveSeconds - - how long to keep threads > min threads alive for
threadFactory -

AsyncEventManager

public AsyncEventManager()
Uses a ThreadPoolExecutor a thread pool with various defaults


AsyncEventManager

public AsyncEventManager(java.util.concurrent.ThreadFactory threadFactory)
Method Detail

getExecutorService

public java.util.concurrent.ExecutorService getExecutorService()


Copyright © 2006-2009 Atlassian. All Rights Reserved.