org.jboss.seam.async
Class ThreadPoolDispatcher
java.lang.Object
org.jboss.seam.async.AbstractDispatcher<Future,TimerSchedule>
org.jboss.seam.async.ThreadPoolDispatcher
- All Implemented Interfaces:
- Dispatcher<Future,TimerSchedule>
@Scope(value=APPLICATION)
@Name(value="org.jboss.seam.async.dispatcher")
@Install(precedence=0)
public class ThreadPoolDispatcher
- extends AbstractDispatcher<Future,TimerSchedule>
Dispatcher implementation that uses a java.util.concurrent
ScheduledThreadPoolExecutor.
- Author:
- Gavin King
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPoolDispatcher
public ThreadPoolDispatcher()
startup
@Create
public void startup()
scheduleAsynchronousEvent
public Future scheduleAsynchronousEvent(String type,
Object... parameters)
- Description copied from interface:
Dispatcher
- Schedule an immediate asynchronous event
- Parameters:
type
- the event typeparameters
- parameters to pass to the event listener method
- Returns:
- some kind of timer object, or null
scheduleTimedEvent
public Future scheduleTimedEvent(String type,
TimerSchedule schedule,
Object... parameters)
- Description copied from interface:
Dispatcher
- Schedule a timed (delayed and/or periodic) event
- Parameters:
type
- the event typeschedule
- the scheduleparameters
- parameters to pass to the event listener method
- Returns:
- some kind of timer object, or null
scheduleInvocation
public Future scheduleInvocation(InvocationContext invocation,
Component component)
- Description copied from interface:
Dispatcher
- Schedule an asynchronous method call, examining annotations
upon the method to determine the schedule
- Returns:
- some kind of timer object, or null
destroy
@Destroy
public void destroy()
getThreadPoolSize
public int getThreadPoolSize()
setThreadPoolSize
public void setThreadPoolSize(int threadPoolSize)