Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.component
Class SimpleCallableJavaComponent

    java.lang.Object
      org.mule.component.AbstractComponent
          org.mule.component.AbstractJavaComponent
              org.mule.component.SimpleCallableJavaComponent

All Implemented Interfaces:
  Component, JavaComponent, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor

    public class SimpleCallableJavaComponent

extends AbstractJavaComponent

Simple `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.
An `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.
This implementation replaces and improves on `OptimizedComponent`/`OptimizedMuleProxy`

Field Summary

Fields inherited from class org.mule.component.AbstractJavaComponent
`bindings, entryPointResolverSet, lifecycleAdapterFactory, 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
`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)`

Method Summary
`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.

Methods inherited from class org.mule.component.AbstractJavaComponent
`createLifecycleAdaptor, doInitialise, doInvoke, getEntryPointResolverSet, getInterfaceBindings, getLifecycleAdapterFactory, getObjectFactory, injectService, setEntryPointResolvers, setEntryPointResolverSet, setFlowConstruct, setInterfaceBindings, setLifecycleAdapterFactory`

Methods inherited from class org.mule.component.AbstractComponent
`createResultEvent, dispose, 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`

Constructor Detail

### SimpleCallableJavaComponent

    public SimpleCallableJavaComponent()

### SimpleCallableJavaComponent

    public SimpleCallableJavaComponent(Callable callable)

  Create an SimpleCallableJavaComponent instance using an object instance that implements `Callable`

  Parameters:
    `callable` -

### SimpleCallableJavaComponent

    public SimpleCallableJavaComponent(Class callable)
                                throws DefaultMuleException

  Create an SimpleCallableJavaComponent instance using an object class. This class should implement `Callable`.

  Parameters:
    `callable` -
  Throws:
    `DefaultMuleException` - if the Class specified does not implement `Callable`

### SimpleCallableJavaComponent

    public SimpleCallableJavaComponent(ObjectFactory objectFactory)
                                throws DefaultMuleException

Throws:
  `DefaultMuleException`

Method Detail

### doStart

    protected void doStart()
                    throws MuleException

  Overrides:
    `doStart` in class `AbstractJavaComponent`
  Throws:
    `MuleException`

### doStop

    protected void doStop()
                   throws MuleException

  Overrides:
    `doStop` in class `AbstractComponent`
  Throws:
    `MuleException`

### doDispose

    protected void doDispose()

  Overrides:
    `doDispose` in class `AbstractJavaComponent`

### getObjectType

    public Class getObjectType()

  Specified by:
    `getObjectType` in interface `JavaComponent`
  Overrides:
    `getObjectType` in class `AbstractJavaComponent`

### borrowComponentLifecycleAdaptor

    protected LifecycleAdapter borrowComponentLifecycleAdaptor()
                                                        throws Exception

  Specified by:
    `borrowComponentLifecycleAdaptor` in class `AbstractJavaComponent`
  Throws:
    `Exception`

### returnComponentLifecycleAdaptor

    protected void returnComponentLifecycleAdaptor(LifecycleAdapter lifecycleAdapter)

  Specified by:
    `returnComponentLifecycleAdaptor` in class `AbstractJavaComponent`

### invokeComponentInstance

    protected Object invokeComponentInstance(MuleEvent event)
                                      throws Exception

  Overrides:
    `invokeComponentInstance` in class `AbstractJavaComponent`
  Throws:
    `Exception`

### 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`
  Overrides:
    `setObjectFactory` in class `AbstractJavaComponent`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.