public abstract class AbstractJavaComponent extends AbstractComponent implements JavaComponent
EntryPointResolverSet
, NestedRouterCollection
and
ObjectFactory
. Provides default implementations of doOnCall and doOnEvent
and defines abstract template methods provided for obtaining and returning the
component object instance.Modifier and Type | Field and Description |
---|---|
protected EntryPointResolverSet |
entryPointResolverSet |
protected LifecycleAdapterFactory |
lifecycleAdapterFactory |
protected NestedRouterCollection |
nestedRouter |
protected ObjectFactory |
objectFactory |
disposed, disposing, initialised, logger, notificationHandler, service, started, statistics, stopping
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractJavaComponent() |
AbstractJavaComponent(ObjectFactory objectFactory) |
AbstractJavaComponent(ObjectFactory objectFactory,
EntryPointResolverSet entryPointResolverSet,
NestedRouterCollection nestedRouterCollection) |
Modifier and Type | Method and Description |
---|---|
protected abstract LifecycleAdapter |
borrowComponentLifecycleAdaptor() |
protected LifecycleAdapter |
createLifeCycleAdaptor()
Creates and initialises a new LifecycleAdaptor instance wrapped the component
object instance obtained from the configured object factory.
|
protected void |
doDispose() |
protected void |
doInitialise() |
protected MuleMessage |
doOnCall(MuleEvent event) |
protected void |
doStart() |
EntryPointResolverSet |
getEntryPointResolverSet()
A
JavaComponent can have a custom entry-point resolver for its own
object. |
LifecycleAdapterFactory |
getLifecycleAdapterFactory()
Returns the factory used create life-cycle adaptors that are used to wrap
component instance.
|
NestedRouterCollection |
getNestedRouter() |
ObjectFactory |
getObjectFactory() |
Class |
getObjectType() |
protected MuleMessage |
invokeComponentInstance(MuleEvent event) |
protected abstract void |
returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter) |
void |
setEntryPointResolvers(Collection entryPointResolvers)
Allow for incremental addition of resolvers by for example the spring-config
module
|
void |
setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
A
JavaComponent can have a custom entry-point resolver for its own
object. |
void |
setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
Sets the factory used create life-cycle adaptors that are used to wrap
component instance.
|
void |
setNestedRouter(NestedRouterCollection nestedRouter) |
void |
setObjectFactory(ObjectFactory objectFactory)
The object factory used to obtain the component object instance.
|
checkDisposed, dispose, doStop, fireComponentNotification, getService, getStatistics, initialise, onCall, release, setService, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getService, getStatistics, onCall, setService
initialise
dispose
protected EntryPointResolverSet entryPointResolverSet
protected NestedRouterCollection nestedRouter
protected ObjectFactory objectFactory
protected LifecycleAdapterFactory lifecycleAdapterFactory
public AbstractJavaComponent()
public AbstractJavaComponent(ObjectFactory objectFactory)
public AbstractJavaComponent(ObjectFactory objectFactory, EntryPointResolverSet entryPointResolverSet, NestedRouterCollection nestedRouterCollection)
protected MuleMessage doOnCall(MuleEvent event) throws Exception
doOnCall
in class AbstractComponent
Exception
protected MuleMessage invokeComponentInstance(MuleEvent event) throws Exception
Exception
public Class getObjectType()
getObjectType
in interface JavaComponent
protected LifecycleAdapter createLifeCycleAdaptor() throws MuleException, Exception
MuleException
Exception
protected abstract LifecycleAdapter borrowComponentLifecycleAdaptor() throws Exception
Exception
protected abstract void returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter) throws Exception
Exception
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractComponent
InitialisationException
protected void doStart() throws MuleException
doStart
in class AbstractComponent
MuleException
protected void doDispose()
doDispose
in class AbstractComponent
public EntryPointResolverSet getEntryPointResolverSet()
JavaComponent
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 modelgetEntryPointResolverSet
in interface JavaComponent
public NestedRouterCollection getNestedRouter()
getNestedRouter
in interface JavaComponent
public void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
JavaComponent
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 modelsetEntryPointResolverSet
in interface JavaComponent
public void setNestedRouter(NestedRouterCollection nestedRouter)
setNestedRouter
in interface JavaComponent
public void setEntryPointResolvers(Collection entryPointResolvers)
entryPointResolvers
- Resolvers to addpublic ObjectFactory getObjectFactory()
getObjectFactory
in interface JavaComponent
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
public LifecycleAdapterFactory getLifecycleAdapterFactory()
JavaComponent
getLifecycleAdapterFactory
in interface JavaComponent
public void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
JavaComponent
setLifecycleAdapterFactory
in interface JavaComponent
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.