public interface Service extends Serializable, Lifecycle, MuleContextAware, NamedObject
Service is the internal representation of a Mule Managed service. It
is responsible for managing the interaction of events to and from the service as
well as managing pooled resources.PHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAME| Modifier and Type | Method and Description |
|---|---|
void |
dispatchEvent(MuleEvent event)
Makes an asynchronous event call to the service.
|
Component |
getComponent()
Returns the Component that is a invoked by a
Service for each incoming
MuleEvent routed on by the InboundRouterCollection. |
ExceptionListener |
getExceptionListener()
The exception strategy to use to handle exceptions in the Mule UMO.
|
InboundRouterCollection |
getInboundRouter()
Inbound Routers control how events are received by a service.
|
String |
getInitialState()
Returns the initial state of this service
|
Model |
getModel()
Returns the name of the model that this descriptor is registered with.
|
MuleContext |
getMuleContext() |
OutboundRouterCollection |
getOutboundRouter()
Outbound Routers control how events are published by a service once.
|
ResponseRouterCollection |
getResponseRouter()
Response Routers control how events are returned in a request/response call.
|
boolean |
isPaused()
True if the service is in a paused state, false otherwise
|
boolean |
isStarted()
Determines whether this service has been started
|
void |
pause()
Pauses event processing for a single Mule Service.
|
void |
resume()
Resumes a single Mule Service that has been paused.
|
MuleMessage |
sendEvent(MuleEvent event)
Makes a synchronous event call to the service.
|
void |
setComponent(Component component)
Sets the Component that is a invoked by a
Service for each incoming
MuleEvent routed on by the InboundRouterCollection. |
void |
setExceptionListener(ExceptionListener listener)
The exception strategy to use to handle exceptions in the Mule UMO.
|
void |
setInboundRouter(InboundRouterCollection router)
Inbound Routers control how events are received by a service.
|
void |
setInitialState(String state)
Sets the initial state of this service
|
void |
setModel(Model model)
Sets the Model name that this descriptor is registered within.
|
void |
setOutboundRouter(OutboundRouterCollection router)
Outbound Routers control how events are published by a service once.
|
void |
setResponseRouter(ResponseRouterCollection router)
Response Routers control how events are returned in a request/response call.
|
initialisedisposesetMuleContextgetName, setNamevoid dispatchEvent(MuleEvent event) throws MuleException
event - the event to consumeMuleException - if the event fails to be processedMuleMessage sendEvent(MuleEvent event) throws MuleException
event - the event to consumeMuleException - if the event fails to be processedboolean isStarted()
void pause()
throws MuleException
MuleExceptionvoid resume()
throws MuleException
MuleExceptionboolean isPaused()
ExceptionListener getExceptionListener()
InboundRouterCollection getInboundRouter()
InboundRouterCollectionOutboundRouterCollection getOutboundRouter()
OutboundRouterCollectionResponseRouterCollection getResponseRouter()
ResponseRouterCollectionString getInitialState()
Model getModel()
void setExceptionListener(ExceptionListener listener)
listener - the exception strategy to use. If none has been set or
argument is null a defaultvoid setInboundRouter(InboundRouterCollection router)
router - the inbound router for this serviceInboundRouterCollectionvoid setOutboundRouter(OutboundRouterCollection router)
router - the outbound router for this serviceOutboundRouterCollectionvoid setResponseRouter(ResponseRouterCollection router)
router - the response router for this serviceResponseRouterCollectionvoid setInitialState(String state)
state - the initial state of this serviceorg.mule.ImmutableMuleDescriptor#INITIAL_STATE_STARTED,
org.mule.ImmutableMuleDescriptor#INITIAL_STATE_STOPPED,
org.mule.ImmutableMuleDescriptor#INITIAL_STATE_PAUSEDvoid setModel(Model model)
modelName - name of the modelComponent getComponent()
Service for each incoming
MuleEvent routed on by the InboundRouterCollection.void setComponent(Component component)
Service for each incoming
MuleEvent routed on by the InboundRouterCollection.component - MuleContext getMuleContext()
Copyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.