org.mule.umo
Interface UMOComponent

All Superinterfaces:
Disposable, Initialisable, Lifecycle, Serializable, Startable, Stoppable
All Known Implementing Classes:
AbstractComponent, DirectComponent, JcaComponent, OptimisedSedaComponent, PipelineComponent, SedaComponent, StreamingComponent

public interface UMOComponent
extends Serializable, Lifecycle, Initialisable

UMOComponent is the interal repesentation of a Mule Managed component. It is responsible for managing the interaction of events to and from the component as well as managing pooled resources.


Method Summary
 void dispatchEvent(UMOEvent event)
          Makes an asynhronous event call to the component.
 UMODescriptor getDescriptor()
           
 Object getInstance()
          Gets the underlying instance for this component.
 boolean isPaused()
          True if the component is in a paused state, false otherwise
 boolean isStarted()
          Determines whether this component has been started
 void pause()
          Pauses event processing for a single Mule Component.
 void resume()
          Resumes a single Mule Component that has been paused.
 UMOMessage sendEvent(UMOEvent event)
          Makes a synhronous event call to the component.
 
Methods inherited from interface org.mule.umo.lifecycle.Startable
start
 
Methods inherited from interface org.mule.umo.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.umo.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.umo.lifecycle.Initialisable
initialise
 

Method Detail

getDescriptor

UMODescriptor getDescriptor()
Returns:
the UMODescriptor associated with the component
See Also:
UMODescriptor

dispatchEvent

void dispatchEvent(UMOEvent event)
                   throws UMOException
Makes an asynhronous event call to the component.

Parameters:
event - the event to consume
Throws:
UMOException - if the event fails to be processed

sendEvent

UMOMessage sendEvent(UMOEvent event)
                     throws UMOException
Makes a synhronous event call to the component. This event will be consumed by the component and a result returned.

Parameters:
event - the event to consume
Returns:
a UMOMessage containing the resulting message and properties
Throws:
UMOException - if the event fails to be processed

isStarted

boolean isStarted()
Determines whether this component has been started

Returns:
true is the component is started andready to receive events

getInstance

Object getInstance()
                   throws UMOException
Gets the underlying instance for this component. When the component implementation provides pooling there is no 1:1 mapping between UMOComponent and instance, so this method would return an object in initial state. If the underlying component is managed in Spring or another IoC container, then the object instance from the corresponding container will be returned.

Returns:
the underlying instance for this component
Throws:
UMOException

pause

void pause()
           throws UMOException
Pauses event processing for a single Mule Component. Unlike stop(), a paused component will still consume messages from the underlying transport, but those messages will be queued until the component is resumed.

Throws:
UMOException

resume

void resume()
            throws UMOException
Resumes a single Mule Component that has been paused. If the component is not paused nothing is executed.

Throws:
UMOException

isPaused

boolean isPaused()
True if the component is in a paused state, false otherwise

Returns:
True if the component is in a paused state, false otherwise


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