org.mule.component
Class AbstractJavaComponent
java.lang.Object
org.mule.component.AbstractComponent
org.mule.component.AbstractJavaComponent
- All Implemented Interfaces:
- AnnotatedObject, Component, JavaComponent, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor
- Direct Known Subclasses:
- DefaultJavaComponent, JcaComponent, PooledJavaComponent, SimpleCallableJavaComponent
public abstract class AbstractJavaComponent
- extends AbstractComponent
- implements JavaComponent
Abstract implementation of JavaComponent adds JavaComponent specifics like
EntryPointResolverSet
and ObjectFactory
.
Methods inherited from class org.mule.component.AbstractComponent |
createResultEvent, dispose, doStop, fireComponentNotification, getAnnotation, getAnnotations, getFlowConstruct, getInterceptors, getName, getStatistics, initialise, process, release, setAnnotations, setInterceptors, setMuleContext, start, stop, toString |
entryPointResolverSet
protected EntryPointResolverSet entryPointResolverSet
bindings
protected List<InterfaceBinding> bindings
objectFactory
protected ObjectFactory objectFactory
lifecycleAdapterFactory
protected LifecycleAdapterFactory lifecycleAdapterFactory
AbstractJavaComponent
public AbstractJavaComponent()
- For Spring only
AbstractJavaComponent
public AbstractJavaComponent(ObjectFactory objectFactory)
AbstractJavaComponent
public AbstractJavaComponent(ObjectFactory objectFactory,
EntryPointResolverSet entryPointResolverSet,
List<InterfaceBinding> bindings)
doInvoke
protected Object doInvoke(MuleEvent event)
throws Exception
- Specified by:
doInvoke
in class AbstractComponent
- Throws:
Exception
invokeComponentInstance
protected Object invokeComponentInstance(MuleEvent event)
throws Exception
- Throws:
Exception
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interface JavaComponent
createLifecycleAdaptor
protected LifecycleAdapter createLifecycleAdaptor()
throws Exception
- Creates and initialises a new LifecycleAdaptor instance wrapped the component
object instance obtained from the configured object factory.
- Throws:
MuleException
Exception
borrowComponentLifecycleAdaptor
protected abstract LifecycleAdapter borrowComponentLifecycleAdaptor()
throws Exception
- Throws:
Exception
returnComponentLifecycleAdaptor
protected abstract void returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter)
throws Exception
- Throws:
Exception
doInitialise
protected void doInitialise()
throws InitialisationException
- Overrides:
doInitialise
in class AbstractComponent
- Throws:
InitialisationException
doStart
protected void doStart()
throws MuleException
- Overrides:
doStart
in class AbstractComponent
- Throws:
MuleException
doDispose
protected void doDispose()
- Overrides:
doDispose
in class AbstractComponent
getEntryPointResolverSet
public EntryPointResolverSet getEntryPointResolverSet()
- Description copied from interface:
JavaComponent
- A
JavaComponent
can have a custom entry-point resolver for its own
object. By default this is null. When set this resolver will override the
resolver on the model
- Specified by:
getEntryPointResolverSet
in interface JavaComponent
- Returns:
- Null is a resolver set has not been set otherwise the resolver to use
on this service
getInterfaceBindings
public List<InterfaceBinding> getInterfaceBindings()
- Specified by:
getInterfaceBindings
in interface JavaComponent
setEntryPointResolverSet
public void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
- Description copied from interface:
JavaComponent
- A
JavaComponent
can have a custom entry-point resolver for its own
object. By default this is null. When set this resolver will override the
resolver on the model
- Specified by:
setEntryPointResolverSet
in interface JavaComponent
setInterfaceBindings
public void setInterfaceBindings(List<InterfaceBinding> bindings)
- Specified by:
setInterfaceBindings
in interface JavaComponent
setEntryPointResolvers
public void setEntryPointResolvers(Collection<EntryPointResolver> entryPointResolvers)
- Allow for incremental addition of resolvers by for example the spring-config
module
- Parameters:
entryPointResolvers
- Resolvers to add
getObjectFactory
public ObjectFactory getObjectFactory()
- Specified by:
getObjectFactory
in interface JavaComponent
setObjectFactory
public void setObjectFactory(ObjectFactory objectFactory)
- Description copied from interface:
JavaComponent
- The object factory used to obtain the component object instance. Mule core
provides two implementations:
SingletonObjectFactory
and
PrototypeObjectFactory
.
The spring-config module provides an
ObjectFactory
implementation that delegates to spring. There is no
PooledObjectFactory, the PooledJavaComponent
should be used for
pooling.
- Specified by:
setObjectFactory
in interface JavaComponent
getLifecycleAdapterFactory
public LifecycleAdapterFactory getLifecycleAdapterFactory()
- Description copied from interface:
JavaComponent
- Returns the factory used create life-cycle adaptors that are used to wrap
component instance.
- Specified by:
getLifecycleAdapterFactory
in interface JavaComponent
setLifecycleAdapterFactory
public void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
- Description copied from interface:
JavaComponent
- Sets the factory used create life-cycle adaptors that are used to wrap
component instance.
- Specified by:
setLifecycleAdapterFactory
in interface JavaComponent
setFlowConstruct
public void setFlowConstruct(FlowConstruct flowConstruct)
- Specified by:
setFlowConstruct
in interface FlowConstructAware
- Overrides:
setFlowConstruct
in class AbstractComponent
injectService
protected void injectService()
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.