org.mule.api.component
Interface Component

All Superinterfaces:
Disposable, Initialisable, Lifecycle, Startable, Stoppable
All Known Subinterfaces:
JavaComponent
All Known Implementing Classes:
AbstractComponent, AbstractJavaComponent, AbstractWebServiceWrapperComponent, DefaultJavaComponent, JcaComponent, PassThroughComponent, PooledJavaComponent, ProcessComponent, RestServiceWrapper, ScriptComponent, SimpleCallableJavaComponent, WebServiceWrapperComponent, WebServiceWrapperComponent

public interface Component
extends Lifecycle

A Component is a invoked by a Service for each incoming MuleEvent routed on by the InboundRouterCollection. A component processes a MuleEvent by invoking the component instance that has been configured, optionally returning a result.

Implementations of Component can use different types of component implementation, implement component instance pooling or implement bindings which allow for service composition.


Field Summary
 
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
 
Method Summary
 Service getService()
           
 ComponentStatistics getStatistics()
          Component statistics are used to gather component statistics such as sync/async invocation counts and total and average execution time.
 MuleMessage invoke(MuleEvent event)
          Invokes the component
 void setService(Service service)
           
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Method Detail

invoke

MuleMessage invoke(MuleEvent event)
                   throws MuleException
Invokes the component

Parameters:
event - the event used to invoke the component
Returns:
the return event from the component
Throws:
MuleException - if the call fails

getStatistics

ComponentStatistics getStatistics()
Component statistics are used to gather component statistics such as sync/async invocation counts and total and average execution time.

Returns:

setService

void setService(Service service)
Parameters:
service -

getService

Service getService()
Returns:


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.