org.ow2.petals.component.framework.process.async
Class AsyncMessageManager

java.lang.Object
  extended by org.ow2.petals.component.framework.process.async.AsyncMessageManager

public class AsyncMessageManager
extends java.lang.Object

An asynchronous message Manager.

Since:
3.0
Author:
chamerling - EBM WebSourcing

Nested Class Summary
 class AsyncMessageManager.AsyncContextCleaner
          The cleaner task.
 
Field Summary
static java.lang.String ASYNC_EXPIRED_MESSAGE_PROPERTY
           
static java.lang.String ASYNC_MESSAGE_PROPERTY
           
static java.lang.String ASYNC_ORIGINAL_MESSAGE_PROPERTY
           
protected  java.util.Map<java.lang.String,AsyncContext> asynchronousContexts
           
protected  JBIProcessorManager jbiProcessorManager
           
protected  org.apache.commons.pool.impl.GenericObjectPool jbiProcessorObjectPool
           
protected  java.util.concurrent.ThreadPoolExecutor jbiProcessorThreadPool
           
protected  java.util.logging.Logger logger
           
protected  java.util.Map<java.lang.String,AsyncContext> originalAsynchronousContexts
           
 
Constructor Summary
AsyncMessageManager(java.util.logging.Logger logger, JBIProcessorManager jbiProcessorManager)
           
 
Method Summary
 void addAsyncContext(org.ow2.petals.component.framework.api.message.Exchange exchange, AsyncContext asyncContext)
          Add an asynchronous message to the asynchronous messages map.
 AsyncContext getAsyncContext(java.lang.String id)
          Get an asynchronous Context by the exchange Id.
 AsyncContext removeAsyncContext(java.lang.String id)
          Remove the asynchronous Context matching the given original Exchange Id.
 void start()
          Start the Async Message Manager.
 void stop()
          Stop the Async Message Manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASYNC_MESSAGE_PROPERTY

public static final java.lang.String ASYNC_MESSAGE_PROPERTY
See Also:
Constant Field Values

ASYNC_ORIGINAL_MESSAGE_PROPERTY

public static final java.lang.String ASYNC_ORIGINAL_MESSAGE_PROPERTY
See Also:
Constant Field Values

ASYNC_EXPIRED_MESSAGE_PROPERTY

public static final java.lang.String ASYNC_EXPIRED_MESSAGE_PROPERTY
See Also:
Constant Field Values

logger

protected final java.util.logging.Logger logger

jbiProcessorThreadPool

protected java.util.concurrent.ThreadPoolExecutor jbiProcessorThreadPool

jbiProcessorObjectPool

protected org.apache.commons.pool.impl.GenericObjectPool jbiProcessorObjectPool

jbiProcessorManager

protected final JBIProcessorManager jbiProcessorManager

asynchronousContexts

protected final java.util.Map<java.lang.String,AsyncContext> asynchronousContexts

originalAsynchronousContexts

protected final java.util.Map<java.lang.String,AsyncContext> originalAsynchronousContexts
Constructor Detail

AsyncMessageManager

public AsyncMessageManager(java.util.logging.Logger logger,
                           JBIProcessorManager jbiProcessorManager)
Parameters:
logger -
Method Detail

start

public void start()
Start the Async Message Manager.


stop

public void stop()
Stop the Async Message Manager.


addAsyncContext

public void addAsyncContext(org.ow2.petals.component.framework.api.message.Exchange exchange,
                            AsyncContext asyncContext)
Add an asynchronous message to the asynchronous messages map.

Parameters:
id -
exchangeSynchronizer -

getAsyncContext

public AsyncContext getAsyncContext(java.lang.String id)
Get an asynchronous Context by the exchange Id.

Parameters:
id -
Returns:
null if the asynchronous message is not found in the map

removeAsyncContext

public AsyncContext removeAsyncContext(java.lang.String id)
Remove the asynchronous Context matching the given original Exchange Id.

Parameters:
id -


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.