org.mule.impl.model
Interface MuleProxy

All Superinterfaces:
Disposable, Lifecycle, Runnable, Startable, Stoppable, javax.resource.spi.work.Work
All Known Implementing Classes:
DefaultMuleProxy, OptimisedMuleProxy

public interface MuleProxy
extends javax.resource.spi.work.Work, Lifecycle

MuleProxy is a proxy to a UMO. It is a poolable object that that can be executed in it's own thread.


Method Summary
 UMOImmutableDescriptor getDescriptor()
           
 ComponentStatistics getStatistics()
           
 void handleException(Exception exception)
          When an exception occurs this method can be called to invoke the configured UMOExceptionStrategy on the UMO
 boolean isSuspended()
          Determines if the proxy is suspended
 Object onCall(UMOEvent event)
          Makes a synchronous call on the UMO
 void onEvent(QueueSession session, UMOEvent event)
          Sets the current event being processed
 void resume()
          Triggers the UMO to resume processing of events if it is suspended
 void setStatistics(ComponentStatistics stat)
           
 void suspend()
          Controls the suspension of the UMO event processing
 
Methods inherited from interface javax.resource.spi.work.Work
release
 
Methods inherited from interface java.lang.Runnable
run
 
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
 

Method Detail

onEvent

void onEvent(QueueSession session,
             UMOEvent event)
Sets the current event being processed

Parameters:
event - the event being processed

getStatistics

ComponentStatistics getStatistics()

setStatistics

void setStatistics(ComponentStatistics stat)

onCall

Object onCall(UMOEvent event)
              throws UMOException
Makes a synchronous call on the UMO

Parameters:
event - the event to pass to the UMO
Returns:
the return event from the UMO
Throws:
UMOException - if the call fails

handleException

void handleException(Exception exception)
When an exception occurs this method can be called to invoke the configured UMOExceptionStrategy on the UMO

Parameters:
exception - If the UMOExceptionStrategy implementation fails

isSuspended

boolean isSuspended()
Determines if the proxy is suspended

Returns:
true if the proxy (and the UMO) are suspended

suspend

void suspend()
Controls the suspension of the UMO event processing


resume

void resume()
Triggers the UMO to resume processing of events if it is suspended


getDescriptor

UMOImmutableDescriptor getDescriptor()


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