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, stoppingPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetService, getStatistics, onCall, setServiceinitialisedisposeprotected 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 AbstractComponentExceptionprotected MuleMessage invokeComponentInstance(MuleEvent event) throws Exception
Exceptionpublic Class getObjectType()
getObjectType in interface JavaComponentprotected LifecycleAdapter createLifeCycleAdaptor() throws MuleException, Exception
MuleExceptionExceptionprotected abstract LifecycleAdapter borrowComponentLifecycleAdaptor() throws Exception
Exceptionprotected abstract void returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter) throws Exception
Exceptionprotected void doInitialise()
throws InitialisationException
doInitialise in class AbstractComponentInitialisationExceptionprotected void doStart()
throws MuleException
doStart in class AbstractComponentMuleExceptionprotected void doDispose()
doDispose in class AbstractComponentpublic EntryPointResolverSet getEntryPointResolverSet()
JavaComponentJavaComponent 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 JavaComponentpublic NestedRouterCollection getNestedRouter()
getNestedRouter in interface JavaComponentpublic void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
JavaComponentJavaComponent 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 JavaComponentpublic void setNestedRouter(NestedRouterCollection nestedRouter)
setNestedRouter in interface JavaComponentpublic void setEntryPointResolvers(Collection entryPointResolvers)
entryPointResolvers - Resolvers to addpublic ObjectFactory getObjectFactory()
getObjectFactory in interface JavaComponentpublic void setObjectFactory(ObjectFactory objectFactory)
JavaComponentSingletonObjectFactory and
PrototypeObjectFactory.ObjectFactory implementation that delegates to spring. There is no
PooledObjectFactory, the PooledJavaComponent should be used for
pooling.setObjectFactory in interface JavaComponentpublic LifecycleAdapterFactory getLifecycleAdapterFactory()
JavaComponentgetLifecycleAdapterFactory in interface JavaComponentpublic void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
JavaComponentsetLifecycleAdapterFactory in interface JavaComponentCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.