|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.component.AbstractComponent
org.mule.component.AbstractJavaComponent
public abstract class AbstractJavaComponent
Abstract implementation of JavaComponent adds JavaComponent specific's:
EntryPointResolverSet, org.mule.api.routing.BindingCollection and
ObjectFactory. Provides default implementations of doOnCall and doOnEvent
and defines abstract template methods provided for obtaining and returning the
component object instance.
| Field Summary | |
|---|---|
protected List<InterfaceBinding> |
bindings
|
protected EntryPointResolverSet |
entryPointResolverSet
|
protected LifecycleAdapterFactory |
lifecycleAdapterFactory
|
protected ObjectFactory |
objectFactory
|
| Fields inherited from class org.mule.component.AbstractComponent |
|---|
flowConstruct, interceptorChain, interceptors, logger, muleContext, notificationHandler, statistics |
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Startable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Stoppable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
AbstractJavaComponent()
For Spring only |
|
AbstractJavaComponent(ObjectFactory objectFactory)
|
|
AbstractJavaComponent(ObjectFactory objectFactory,
EntryPointResolverSet entryPointResolverSet,
List<InterfaceBinding> bindings)
|
|
| Method Summary | |
|---|---|
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 Object |
doInvoke(MuleEvent event)
|
protected void |
doStart()
|
EntryPointResolverSet |
getEntryPointResolverSet()
A JavaComponent can have a custom entry-point resolver for its own
object. |
List<InterfaceBinding> |
getInterfaceBindings()
|
LifecycleAdapterFactory |
getLifecycleAdapterFactory()
Returns the factory used create life-cycle adaptors that are used to wrap component instance. |
ObjectFactory |
getObjectFactory()
|
Class<?> |
getObjectType()
|
protected void |
injectService()
|
protected Object |
invokeComponentInstance(MuleEvent event)
|
protected abstract void |
returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter)
|
void |
setEntryPointResolvers(Collection<EntryPointResolver> 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 |
setFlowConstruct(FlowConstruct flowConstruct)
|
void |
setInterfaceBindings(List<InterfaceBinding> bindings)
|
void |
setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
Sets the factory used create life-cycle adaptors that are used to wrap component instance. |
void |
setObjectFactory(ObjectFactory objectFactory)
The object factory used to obtain the component object instance. |
| Methods inherited from class org.mule.component.AbstractComponent |
|---|
createResultEvent, dispose, doStop, fireComponentNotification, getFlowConstruct, getInterceptors, getStatistics, initialise, process, release, setInterceptors, setMuleContext, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mule.api.component.Component |
|---|
getStatistics |
| Methods inherited from interface org.mule.api.processor.MessageProcessor |
|---|
process |
| Field Detail |
|---|
protected EntryPointResolverSet entryPointResolverSet
protected List<InterfaceBinding> bindings
protected ObjectFactory objectFactory
protected LifecycleAdapterFactory lifecycleAdapterFactory
| Constructor Detail |
|---|
public AbstractJavaComponent()
public AbstractJavaComponent(ObjectFactory objectFactory)
public AbstractJavaComponent(ObjectFactory objectFactory,
EntryPointResolverSet entryPointResolverSet,
List<InterfaceBinding> bindings)
| Method Detail |
|---|
protected Object doInvoke(MuleEvent event)
throws Exception
doInvoke in class AbstractComponentException
protected Object invokeComponentInstance(MuleEvent event)
throws Exception
Exceptionpublic Class<?> getObjectType()
getObjectType in interface JavaComponent
protected LifecycleAdapter createLifecycleAdaptor()
throws 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 AbstractComponentInitialisationException
protected 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 model
getEntryPointResolverSet in interface JavaComponentpublic List<InterfaceBinding> getInterfaceBindings()
getInterfaceBindings 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 model
setEntryPointResolverSet in interface JavaComponentpublic void setInterfaceBindings(List<InterfaceBinding> bindings)
setInterfaceBindings in interface JavaComponentpublic void setEntryPointResolvers(Collection<EntryPointResolver> 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()
JavaComponent
getLifecycleAdapterFactory in interface JavaComponentpublic void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
JavaComponent
setLifecycleAdapterFactory in interface JavaComponentpublic void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwaresetFlowConstruct in class AbstractComponentprotected void injectService()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||