|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jms.listener.serversession.AbstractPoolingServerSessionFactory
public abstract class AbstractPoolingServerSessionFactory
Abstract base class for ServerSessionFactory implementations that pool ServerSessionFactory instances.
Provides a factory method that creates a poolable ServerSession (to be added as new instance to a pool), a callback method invoked when a ServerSession finished an execution of its listener (to return an instance to the pool), and a method to destroy a ServerSession instance (after removing an instance from the pool).
CommonsPoolServerSessionFactory| Field Summary | |
|---|---|
protected Log |
logger
Deprecated. |
| Constructor Summary | |
|---|---|
AbstractPoolingServerSessionFactory()
Deprecated. |
|
| Method Summary | |
|---|---|
protected ServerSession |
createServerSession(ListenerSessionManager sessionManager)
Deprecated. Create a new poolable ServerSession. |
protected void |
destroyServerSession(ServerSession serverSession)
Deprecated. Destroy the given poolable ServerSession. |
int |
getMaxSize()
Deprecated. Return the maximum size of the pool. |
protected TaskExecutor |
getTaskExecutor()
Deprecated. Return the TaskExecutor to use for executing ServerSessions. |
protected abstract void |
serverSessionFinished(ServerSession serverSession,
ListenerSessionManager sessionManager)
Deprecated. Template method called by a ServerSession if it finished execution of its listener and is ready to go back into the pool. |
void |
setMaxSize(int maxSize)
Deprecated. Set the maximum size of the pool. |
void |
setTaskExecutor(TaskExecutor taskExecutor)
Deprecated. Specify the TaskExecutor to use for executing ServerSessions (and consequently, the underlying MessageListener). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.jms.listener.serversession.ServerSessionFactory |
|---|
close, getServerSession |
| Field Detail |
|---|
protected final Log logger
| Constructor Detail |
|---|
public AbstractPoolingServerSessionFactory()
| Method Detail |
|---|
public void setTaskExecutor(TaskExecutor taskExecutor)
Default is a TimerTaskExecutor
for each pooled ServerSession, using one Thread per pooled JMS Session.
Alternatives are a shared TimerTaskExecutor, sharing a single Thread
for the execution of all ServerSessions, or a TaskExecutor
implementation backed by a thread pool.
protected TaskExecutor getTaskExecutor()
public void setMaxSize(int maxSize)
public int getMaxSize()
protected final ServerSession createServerSession(ListenerSessionManager sessionManager)
throws JMSException
sessionManager - the listener session manager to create the
poolable ServerSession for
JMSException - if creation failedprotected final void destroyServerSession(ServerSession serverSession)
serverSession - the poolable ServerSession to destroy
protected abstract void serverSessionFinished(ServerSession serverSession,
ListenerSessionManager sessionManager)
Subclasses should implement the actual returning of the instance to the pool.
serverSession - the ServerSession that finished its executionsessionManager - the session manager that the ServerSession belongs to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||