|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.AsyncBaseLifeCycle
public class AsyncBaseLifeCycle
Base class for life cycle management of components. This class may be used as is.
| Field Summary | |
|---|---|
protected javax.jbi.messaging.DeliveryChannel |
channel
|
protected ServiceMixComponent |
component
|
protected org.apache.servicemix.executors.Executor |
consumerExecutor
|
protected Container |
container
|
protected javax.jbi.component.ComponentContext |
context
|
protected java.lang.ThreadLocal<java.lang.String> |
correlationId
|
protected java.lang.String |
currentState
|
protected org.apache.servicemix.executors.ExecutorFactory |
executorFactory
|
static java.lang.String |
INITIALIZED
|
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
knownExchanges
|
protected org.slf4j.Logger |
logger
|
protected javax.management.ObjectName |
mbeanName
|
protected java.lang.Thread |
poller
|
protected java.util.concurrent.atomic.AtomicBoolean |
polling
|
protected org.apache.servicemix.executors.Executor |
providerExecutor
|
protected java.util.concurrent.atomic.AtomicBoolean |
running
|
protected javax.transaction.TransactionManager |
transactionManager
|
protected boolean |
workManagerCreated
|
| Constructor Summary | |
|---|---|
AsyncBaseLifeCycle()
|
|
AsyncBaseLifeCycle(ServiceMixComponent component)
|
|
| Method Summary | |
|---|---|
protected org.apache.servicemix.executors.ExecutorFactory |
createExecutorFactory()
|
protected javax.management.ObjectName |
createExtensionMBeanName()
|
protected void |
doInit()
|
protected void |
doShutDown()
|
protected void |
doStart()
|
protected void |
doStop()
|
protected boolean |
exceptionShouldRollbackTx(java.lang.Throwable t)
|
protected org.apache.servicemix.executors.ExecutorFactory |
findExecutorFactory()
|
Container |
getContainer()
|
javax.jbi.component.ComponentContext |
getContext()
|
java.lang.String |
getCurrentState()
|
javax.xml.namespace.QName |
getEPRServiceName()
|
org.apache.servicemix.executors.Executor |
getExecutor(javax.jbi.messaging.MessageExchange.Role role)
|
org.apache.servicemix.executors.ExecutorFactory |
getExecutorFactory()
|
protected java.lang.Object |
getExtensionMBean()
|
javax.management.ObjectName |
getExtensionMBeanName()
|
protected java.util.Set<java.lang.String> |
getKnownExchanges(Endpoint endpoint)
|
protected Endpoint |
getResolvedEPR(javax.jbi.servicedesc.ServiceEndpoint ep)
Handle an exchange sent to an EPR resolved by this component |
java.lang.Object |
getSmx3Container()
|
void |
handleExchange(Endpoint endpoint,
javax.jbi.messaging.MessageExchange exchange,
boolean add)
|
void |
init(javax.jbi.component.ComponentContext context)
|
boolean |
isInitialized()
|
boolean |
isShutDown()
|
boolean |
isStarted()
|
boolean |
isStopped()
|
boolean |
isUnknown()
|
void |
onMessageExchange(javax.jbi.messaging.MessageExchange exchange)
|
protected void |
pollDeliveryChannel()
|
void |
prepareExchange(javax.jbi.messaging.MessageExchange exchange,
Endpoint endpoint)
|
void |
prepareShutdown(Endpoint endpoint)
Prepare an endpoint for shutdown by waiting until all its pending exchanges have been finished. |
void |
prepareShutdown(Endpoint endpoint,
long timeout)
Prepare an endpoint for shutdown by waiting until all its pending exchanges have been finished. |
protected void |
processExchange(javax.jbi.messaging.MessageExchange exchange)
|
protected void |
processExchangeInTx(javax.jbi.messaging.MessageExchange exchange,
javax.transaction.Transaction tx)
|
protected void |
setComponent(ServiceMixComponent component)
|
protected void |
setCurrentState(java.lang.String currentState)
|
void |
setExecutor(javax.jbi.messaging.MessageExchange.Role role,
org.apache.servicemix.executors.Executor executor)
The executor to use for various tasks that need to be performed by the component. |
void |
setExecutorFactory(org.apache.servicemix.executors.ExecutorFactory executorFactory)
The executor factory to use to create the executor. |
void |
shutDown()
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INITIALIZED
protected transient org.slf4j.Logger logger
protected ServiceMixComponent component
protected javax.jbi.component.ComponentContext context
protected javax.management.ObjectName mbeanName
protected org.apache.servicemix.executors.ExecutorFactory executorFactory
protected org.apache.servicemix.executors.Executor consumerExecutor
protected org.apache.servicemix.executors.Executor providerExecutor
protected java.util.concurrent.atomic.AtomicBoolean running
protected javax.jbi.messaging.DeliveryChannel channel
protected java.lang.Thread poller
protected java.util.concurrent.atomic.AtomicBoolean polling
protected javax.transaction.TransactionManager transactionManager
protected boolean workManagerCreated
protected java.lang.ThreadLocal<java.lang.String> correlationId
protected java.lang.String currentState
protected Container container
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> knownExchanges
| Constructor Detail |
|---|
public AsyncBaseLifeCycle()
public AsyncBaseLifeCycle(ServiceMixComponent component)
| Method Detail |
|---|
public Container getContainer()
protected void setComponent(ServiceMixComponent component)
public javax.management.ObjectName getExtensionMBeanName()
getExtensionMBeanName in interface javax.jbi.component.ComponentLifeCycle
protected java.lang.Object getExtensionMBean()
throws java.lang.Exception
java.lang.Exception
protected javax.management.ObjectName createExtensionMBeanName()
throws java.lang.Exception
java.lang.Exceptionpublic javax.xml.namespace.QName getEPRServiceName()
public java.lang.String getCurrentState()
protected void setCurrentState(java.lang.String currentState)
public boolean isStarted()
public boolean isStopped()
public boolean isShutDown()
public boolean isInitialized()
public boolean isUnknown()
public void init(javax.jbi.component.ComponentContext context)
throws javax.jbi.JBIException
init in interface javax.jbi.component.ComponentLifeCyclejavax.jbi.JBIException
protected void doInit()
throws java.lang.Exception
java.lang.Exception
public void shutDown()
throws javax.jbi.JBIException
shutDown in interface javax.jbi.component.ComponentLifeCyclejavax.jbi.JBIException
protected void doShutDown()
throws java.lang.Exception
java.lang.Exception
public void start()
throws javax.jbi.JBIException
start in interface javax.jbi.component.ComponentLifeCyclejavax.jbi.JBIException
protected void doStart()
throws java.lang.Exception
java.lang.Exceptionprotected void pollDeliveryChannel()
public void stop()
throws javax.jbi.JBIException
stop in interface javax.jbi.component.ComponentLifeCyclejavax.jbi.JBIException
protected void doStop()
throws java.lang.Exception
java.lang.Exceptionpublic javax.jbi.component.ComponentContext getContext()
public org.apache.servicemix.executors.Executor getExecutor(javax.jbi.messaging.MessageExchange.Role role)
public void setExecutor(javax.jbi.messaging.MessageExchange.Role role,
org.apache.servicemix.executors.Executor executor)
executor - setExecutorFactory(ExecutorFactory)public org.apache.servicemix.executors.ExecutorFactory getExecutorFactory()
public void setExecutorFactory(org.apache.servicemix.executors.ExecutorFactory executorFactory)
executorFactory - #setExecutor(Role, Executor)protected org.apache.servicemix.executors.ExecutorFactory createExecutorFactory()
public java.lang.Object getSmx3Container()
protected org.apache.servicemix.executors.ExecutorFactory findExecutorFactory()
protected void processExchangeInTx(javax.jbi.messaging.MessageExchange exchange,
javax.transaction.Transaction tx)
protected boolean exceptionShouldRollbackTx(java.lang.Throwable t)
public void onMessageExchange(javax.jbi.messaging.MessageExchange exchange)
protected void processExchange(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
java.lang.Exception
public void prepareExchange(javax.jbi.messaging.MessageExchange exchange,
Endpoint endpoint)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
public void prepareShutdown(Endpoint endpoint)
throws java.lang.InterruptedException
endpoint - the endpoint that is about to be shut down
java.lang.InterruptedException
public void prepareShutdown(Endpoint endpoint,
long timeout)
throws java.lang.InterruptedException
endpoint - the endpoint that is about to be shut downtimeout - the maximum amount of time (in milliseconds) to wait
java.lang.InterruptedExceptionprotected java.util.Set<java.lang.String> getKnownExchanges(Endpoint endpoint)
public void handleExchange(Endpoint endpoint,
javax.jbi.messaging.MessageExchange exchange,
boolean add)
protected Endpoint getResolvedEPR(javax.jbi.servicedesc.ServiceEndpoint ep)
throws java.lang.Exception
ep - the service endpoint
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||