org.apache.camel
Interface SuspendableService

All Superinterfaces:
Service
All Known Subinterfaces:
CamelContext
All Known Implementing Classes:
AtomEntryPollingConsumer, AtomPollingConsumer, BlueprintCamelContext, DefaultCamelContext, DefaultScheduledPollConsumer, DirectConsumer, FeedEntryPollingConsumer, FeedPollingConsumer, FileConsumer, FtpConsumer, GaeDefaultCamelContext, GaeSpringCamelContext, GenericFileConsumer, GuiceCamelContext, HttpConsumer, IBatisPollingConsumer, JmsConsumer, JpaConsumer, MailConsumer, OsgiDefaultCamelContext, OsgiSpringCamelContext, RemoteFileConsumer, RssEntryPollingConsumer, RssPollingConsumer, ScheduledPollConsumer, SftpConsumer, SnmpOIDPoller, SpringCamelContext

public interface SuspendableService
extends Service

A Service which is also capable of suspending and resuming.

This is useable for services which needs more fine grained control at runtime supporting suspension. Other services may select to mimic suspending by just stopping the service.

For example this is use by the JmsConsumer which suspends the Spring JMS listener instead of stopping the consumer totally.

Version:
$Revision: 20640 $

Method Summary
 boolean isSuspended()
          Tests whether the service is suspended or not.
 void resume()
          Resumes the service.
 void suspend()
          Suspends the service.
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Method Detail

suspend

void suspend()
             throws Exception
Suspends the service.

Throws:
Exception - is thrown if suspending failed

resume

void resume()
            throws Exception
Resumes the service.

Throws:
Exception - is thrown if resuming failed

isSuspended

boolean isSuspended()
Tests whether the service is suspended or not.

Returns:
true if suspended


Apache CAMEL