@Deprecated public abstract class AbstractService extends AbstractAnnotatedObject implements Service, MessageProcessor
Modifier and Type | Field and Description |
---|---|
protected ServiceAsyncReplyCompositeMessageSource |
asyncReplyMessageSource
Deprecated.
|
protected Component |
component
Deprecated.
|
protected MessagingExceptionHandler |
exceptionListener
Deprecated.
The exception strategy used by the service.
|
static String |
INITIAL_STATE_PAUSED
Deprecated.
|
static String |
INITIAL_STATE_STARTED
Deprecated.
|
static String |
INITIAL_STATE_STOPPED
Deprecated.
The initial states that the service can be started in
|
protected String |
initialState
Deprecated.
Determines the initial state of this service when the model starts.
|
protected ServiceLifecycleManager |
lifecycleManager
Deprecated.
|
protected Log |
logger
Deprecated.
logger used by this class
|
protected MessageInfoMapping |
messageInfoMapping
Deprecated.
|
protected MessageProcessorChain |
messageProcessorChain
Deprecated.
|
protected MessageSource |
messageSource
Deprecated.
|
protected Model |
model
Deprecated.
The model in which this service is registered
|
protected MuleContext |
muleContext
Deprecated.
|
protected String |
name
Deprecated.
The service's name
|
protected MessageProcessor |
outboundRouter
Deprecated.
|
protected ServiceStatistics |
stats
Deprecated.
|
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
AbstractService(MuleContext muleContext)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addMessageProcessors(MessageProcessorChainBuilder builder)
Deprecated.
|
protected void |
buildServiceMessageProcessorChain()
Deprecated.
|
protected ServiceAsyncRequestReplyRequestor |
createAsyncReplyProcessor()
Deprecated.
|
protected ServiceStatistics |
createStatistics()
Deprecated.
|
void |
dispatchEvent(MuleEvent event)
Deprecated.
|
void |
dispose()
Deprecated.
A lifecycle method where implementor should free up any resources.
|
protected void |
disposeIfDisposable(Object candidate)
Deprecated.
|
protected void |
doDispose()
Deprecated.
|
protected void |
doForceStop()
Deprecated.
|
protected void |
doInitialise()
Deprecated.
|
protected void |
doPause()
Deprecated.
Custom components can execute code necessary to put the service in a paused state here.
|
protected void |
doResume()
Deprecated.
Custom components can execute code necessary to resume a service once it has
been paused If a developer overloads this method the doPause() method MUST
also be overloaded to avoid inconsistent state in the service
|
protected void |
doStart()
Deprecated.
|
protected void |
doStop()
Deprecated.
|
void |
forceStop()
Deprecated.
|
ServiceAsyncReplyCompositeMessageSource |
getAsyncReplyMessageSource()
Deprecated.
|
protected long |
getAsyncReplyTimeout()
Deprecated.
|
Component |
getComponent()
Deprecated.
|
MessagingExceptionHandler |
getExceptionListener()
Deprecated.
|
String |
getInitialState()
Deprecated.
Returns the initial state of this service
|
LifecycleManager |
getLifecycleManager()
Deprecated.
|
LifecycleState |
getLifecycleState()
Deprecated.
|
MessageInfoMapping |
getMessageInfoMapping()
Deprecated.
|
MessageProcessorChain |
getMessageProcessorChain()
Deprecated.
|
MessageSource |
getMessageSource()
Deprecated.
|
Model |
getModel()
Deprecated.
Returns the name of the model that this descriptor is registered with.
|
MuleContext |
getMuleContext()
Deprecated.
|
String |
getName()
Deprecated.
Gets the name of the object
|
MessageProcessor |
getOutboundMessageProcessor()
Deprecated.
Outbound Routers control how events are published by a service once.
|
protected MessageProcessor |
getServiceStartedAssertingMessageProcessor()
Deprecated.
|
ServiceStatistics |
getStatistics()
Deprecated.
Returns the Service statistics.
|
void |
initialise()
Deprecated.
Initialise the service.
|
protected void |
initialiseIfInitialisable(Object candidate)
Deprecated.
|
protected void |
injectFlowConstructMuleContext(Object candidate)
Deprecated.
|
protected void |
injectFlowConstructMuleContextExceptionHandler(Object candidate)
Deprecated.
|
boolean |
isPaused()
Deprecated.
Determines if the service is in a paused state
|
boolean |
isStarted()
Deprecated.
Determines whether this service has been started
|
boolean |
isStopped()
Deprecated.
|
boolean |
isStopping()
Deprecated.
|
void |
pause()
Deprecated.
Pauses event processing for a single Mule Service.
|
protected void |
pauseIfPausable(Object candidate)
Deprecated.
|
MuleEvent |
process(MuleEvent event)
Deprecated.
Invokes the MessageProcessor.
|
void |
resume()
Deprecated.
Resumes a single Mule Service that has been paused.
|
protected void |
resumeIfResumable(Object candidate)
Deprecated.
|
MuleEvent |
sendEvent(MuleEvent event)
Deprecated.
|
void |
setAsyncReplyMessageSource(ServiceAsyncReplyCompositeMessageSource asyncReplyMessageSource)
Deprecated.
|
void |
setComponent(Component component)
Deprecated.
|
void |
setExceptionListener(MessagingExceptionHandler exceptionListener)
Deprecated.
|
void |
setInitialState(String initialState)
Deprecated.
Sets the initial state of this service
|
void |
setMessageInfoMapping(MessageInfoMapping messageInfoMapping)
Deprecated.
|
void |
setMessageProcessor(MessageProcessor processor)
Deprecated.
|
void |
setMessageSource(MessageSource inboundMessageSource)
Deprecated.
|
void |
setModel(Model model)
Deprecated.
|
void |
setName(String name)
Deprecated.
Sets the name of the object
|
void |
setOutboundMessageProcessor(MessageProcessor processor)
Deprecated.
Outbound message processor controls how events are published by a service once the
event has been processed.
|
void |
start()
Deprecated.
|
protected void |
startIfStartable(Object candidate)
Deprecated.
|
void |
stop()
Deprecated.
|
protected void |
stopIfStoppable(Object candidate)
Deprecated.
|
String |
toString()
Deprecated.
|
getAnnotation, getAnnotations, setAnnotations
protected transient Log logger
protected ServiceStatistics stats
protected Model model
protected MuleContext muleContext
protected ServiceLifecycleManager lifecycleManager
public static final String INITIAL_STATE_STOPPED
public static final String INITIAL_STATE_STARTED
public static final String INITIAL_STATE_PAUSED
protected MessagingExceptionHandler exceptionListener
protected String name
protected MessageProcessor outboundRouter
protected MessageSource messageSource
protected ServiceAsyncReplyCompositeMessageSource asyncReplyMessageSource
protected MessageProcessorChain messageProcessorChain
protected MessageInfoMapping messageInfoMapping
protected String initialState
protected Component component
public AbstractService(MuleContext muleContext)
public final void initialise() throws InitialisationException
initialise
in interface Initialisable
InitialisationException
- if the service fails to
initialiseRecoverableException
- if an error occurs that can be recovered fromServiceDescriptor
public void start() throws MuleException
start
in interface Startable
MuleException
public final void pause() throws MuleException
pause
in interface Service
MuleException
public final void resume() throws MuleException
resume
in interface Service
MuleException
public void stop() throws MuleException
stop
in interface Stoppable
MuleException
public final void dispose()
Disposable
dispose
in interface Disposable
public LifecycleState getLifecycleState()
getLifecycleState
in interface LifecycleStateEnabled
public boolean isStarted()
Service
public boolean isPaused()
public boolean isStopping()
protected void doPause() throws MuleException
MuleException
protected void doResume() throws MuleException
MuleException
protected void doForceStop() throws MuleException
MuleException
protected void doStop() throws MuleException
MuleException
protected void doStart() throws MuleException
MuleException
protected void doDispose()
protected void doInitialise() throws InitialisationException
InitialisationException
public void forceStop() throws MuleException
MuleException
protected void buildServiceMessageProcessorChain() throws MuleException
MuleException
protected MessageProcessor getServiceStartedAssertingMessageProcessor()
protected abstract void addMessageProcessors(MessageProcessorChainBuilder builder)
protected ServiceStatistics createStatistics()
public ServiceStatistics getStatistics()
Service
getStatistics
in interface FlowConstruct
getStatistics
in interface Service
@Deprecated public void dispatchEvent(MuleEvent event) throws MuleException
Service
dispatchEvent
in interface Service
event
- the event to consumeMuleException
- if the event fails to be processed@Deprecated public MuleEvent sendEvent(MuleEvent event) throws MuleException
Service
sendEvent
in interface Service
event
- the event to consumeMuleException
- if the event fails to be processedpublic String getName()
NamedObject
getName
in interface NamedObject
public Model getModel()
Service
public MessagingExceptionHandler getExceptionListener()
getExceptionListener
in interface FlowConstruct
getExceptionListener
in interface Service
public void setExceptionListener(MessagingExceptionHandler exceptionListener)
setExceptionListener
in interface Service
public MessageSource getMessageSource()
getMessageSource
in interface Service
public void setMessageSource(MessageSource inboundMessageSource)
setMessageSource
in interface Service
public MessageProcessor getOutboundMessageProcessor()
Service
getOutboundMessageProcessor
in interface Service
OutboundRouterCollection
@Deprecated public void setMessageProcessor(MessageProcessor processor)
public void setOutboundMessageProcessor(MessageProcessor processor)
Service
setOutboundMessageProcessor
in interface Service
public ServiceAsyncReplyCompositeMessageSource getAsyncReplyMessageSource()
getAsyncReplyMessageSource
in interface Service
public void setAsyncReplyMessageSource(ServiceAsyncReplyCompositeMessageSource asyncReplyMessageSource)
setAsyncReplyMessageSource
in interface Service
public String getInitialState()
Service
getInitialState
in interface Service
public void setInitialState(String initialState)
Service
setInitialState
in interface Service
initialState
- the initial state of this servicepublic void setName(String name)
NameableObject
setName
in interface NameableObject
name
- the name of the objectpublic Component getComponent()
Service
Service
for each incoming
MuleEvent
routed on by the inbound routers.getComponent
in interface Service
public void setComponent(Component component)
Service
Service
for each incoming
MuleEvent
routed on by the inbound routers.setComponent
in interface Service
public MuleContext getMuleContext()
getMuleContext
in interface FlowConstruct
getMuleContext
in interface Service
public LifecycleManager getLifecycleManager()
getLifecycleManager
in interface Service
public MessageInfoMapping getMessageInfoMapping()
getMessageInfoMapping
in interface FlowConstruct
MessageInfoMapping
used to control how Important message
information is pulled from the current message.public void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)
protected long getAsyncReplyTimeout()
protected ServiceAsyncRequestReplyRequestor createAsyncReplyProcessor()
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
public MessageProcessorChain getMessageProcessorChain()
protected void injectFlowConstructMuleContextExceptionHandler(Object candidate)
protected void injectFlowConstructMuleContext(Object candidate)
protected void initialiseIfInitialisable(Object candidate) throws InitialisationException
InitialisationException
protected void startIfStartable(Object candidate) throws MuleException
MuleException
protected void stopIfStoppable(Object candidate) throws MuleException
MuleException
protected void disposeIfDisposable(Object candidate)
protected void pauseIfPausable(Object candidate) throws MuleException
MuleException
protected void resumeIfResumable(Object candidate) throws MuleException
MuleException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.