org.apache.camel.impl
Class ServiceSupport
java.lang.Object
org.apache.camel.impl.ServiceSupport
- All Implemented Interfaces:
- Service
- Direct Known Subclasses:
- CamelTemplate, ChoiceProcessor, CompositeProcessor, DeadLetterChannel, DefaultCamelContext, DefaultComponent, DefaultConsumer, DefaultProducer, DelegateProcessor, FilterProcessor, IdempotentConsumer, LoggingErrorHandler, MulticastProcessor, PollingConsumerSupport, ProducerCache, QueueEndpointConsumer, RecipientList, Resequencer, SendProcessor, Splitter
public abstract class ServiceSupport
- extends Object
- implements Service
A useful base class which ensures that a service is only initialized once and provides some helper methods for
enquiring of its status
- Version:
- $Revision: 534063 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceSupport
public ServiceSupport()
start
public void start()
throws Exception
- Description copied from interface:
Service
- Starts the service
- Specified by:
start
in interface Service
- Throws:
Exception
stop
public void stop()
throws Exception
- Description copied from interface:
Service
- Stops the service
- Specified by:
stop
in interface Service
- Throws:
Exception
isStarted
public boolean isStarted()
- Returns:
- true if this service has been started
isStopping
public boolean isStopping()
- Returns:
- true if this service is in the process of closing
isStopped
public boolean isStopped()
- Returns:
- true if this service is closed
doStart
protected abstract void doStart()
throws Exception
- Throws:
Exception
doStop
protected abstract void doStop()
throws Exception
- Throws:
Exception
Copyright © 2007 Apache Software Foundation. All Rights Reserved.