public class SimpleCallableJavaComponent extends AbstractJavaComponent
JavaComponent
implementation to be used when
LifecycleAdapter
is not required because i) the object instance implements
Callable
and so entry-point resolution is required and ii) component bindings
are not used.ObjectFactory
can be set but must return object
instances that implement Callable
. If one of the constructors that takes
just a Class or the instance itself is used then the
SingletonObjectFactory
is used by default. OptimizedComponent
/OptimizedMuleProxy
bindings, entryPointResolverSet, lifecycleAdapterFactory, objectFactory
flowConstruct, interceptorChain, interceptors, lifecycleManager, logger, muleContext, notificationHandler, statistics
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
SimpleCallableJavaComponent() |
SimpleCallableJavaComponent(Callable callable)
Create an SimpleCallableJavaComponent instance using an object instance that
implements
Callable |
SimpleCallableJavaComponent(Class callable)
Create an SimpleCallableJavaComponent instance using an object class.
|
SimpleCallableJavaComponent(ObjectFactory objectFactory) |
Modifier and Type | Method and Description |
---|---|
protected LifecycleAdapter |
borrowComponentLifecycleAdaptor() |
protected void |
doDispose() |
protected void |
doStart() |
protected void |
doStop() |
Class |
getObjectType() |
protected Object |
invokeComponentInstance(MuleEvent event) |
protected void |
returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter) |
void |
setObjectFactory(ObjectFactory objectFactory)
The object factory used to obtain the component object instance.
|
createLifecycleAdaptor, doInitialise, doInvoke, getEntryPointResolverSet, getInterfaceBindings, getLifecycleAdapterFactory, getObjectFactory, injectService, setEntryPointResolvers, setEntryPointResolverSet, setFlowConstruct, setInterfaceBindings, setLifecycleAdapterFactory
applyLifecycleAndDependencyInjection, createResultEvent, dispose, fireComponentNotification, getAnnotation, getAnnotations, getFlowConstruct, getInterceptors, getName, getStatistics, initialise, process, release, setAnnotations, setInterceptors, setMessagingExceptionHandler, setMuleContext, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getStatistics
process
public SimpleCallableJavaComponent()
public SimpleCallableJavaComponent(Callable callable)
Callable
callable
- public SimpleCallableJavaComponent(Class callable) throws DefaultMuleException
Callable
.callable
- DefaultMuleException
- if the Class specified does not implement
Callable
public SimpleCallableJavaComponent(ObjectFactory objectFactory) throws DefaultMuleException
DefaultMuleException
protected void doStart() throws MuleException
doStart
in class AbstractJavaComponent
MuleException
protected void doStop() throws MuleException
doStop
in class AbstractComponent
MuleException
protected void doDispose()
doDispose
in class AbstractJavaComponent
public Class getObjectType()
getObjectType
in interface JavaComponent
getObjectType
in class AbstractJavaComponent
protected LifecycleAdapter borrowComponentLifecycleAdaptor() throws Exception
borrowComponentLifecycleAdaptor
in class AbstractJavaComponent
Exception
protected void returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter)
returnComponentLifecycleAdaptor
in class AbstractJavaComponent
protected Object invokeComponentInstance(MuleEvent event) throws Exception
invokeComponentInstance
in class AbstractJavaComponent
Exception
public void setObjectFactory(ObjectFactory objectFactory)
JavaComponent
SingletonObjectFactory
and
PrototypeObjectFactory
.ObjectFactory
implementation that delegates to spring. There is no
PooledObjectFactory, the PooledJavaComponent
should be used for
pooling.setObjectFactory
in interface JavaComponent
setObjectFactory
in class AbstractJavaComponent
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.