org.mule.api.lifecycle
Interface Callable

All Superinterfaces:
EventListener
All Known Implementing Classes:
AbderaServiceComponent.AbderaCallable, AccumulatorComponent, AxisServiceComponent, BusinessErrorManager, DataGenerator, EchoComponent, FunctionalStreamingTestComponent, FunctionalTestComponent, GroovyRefreshableBeanBuilder, LogComponent, Mail, MuleEventMulticaster, NullComponent, RemoteDispatcherComponent, SessionPropertiesValidatorComponent, SpringRemoteInvokerComponent, StaticComponent, Storage, TestSecurityComponent, TestServiceComponent, TickFeed, TransactionalFunctionalTestComponent, WSProxyService

public interface Callable
extends EventListener

Callable is used to provide a Service with an interface that supports event calls. Components do not have to implement this interface, though the onCall method provides an example lifecycle method that is executed when an event is received for the implementing service.


Method Summary
 Object onCall(MuleEventContext eventContext)
          Passes the event to the listener
 

Method Detail

onCall

Object onCall(MuleEventContext eventContext)
              throws Exception
Passes the event to the listener

Parameters:
eventContext - the context of the current event being process
Returns:
Object this object can be anything. When the LifecycleAdapter for the service receives this object it will first see if the Object is an MuleMessage if not and the Object is not null a new message will be created using the returned object as the payload. This new event will then get published via the configured outbound router if-
  1. One has been configured for the component.
  2. the setStopFurtherProcessing(true) wasn't called on the event context event.
Throws:
Exception - if the event fails to process properly. If exceptions aren't handled by the implementation they will be handled by the exceptionListener associated with the service


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