org.apache.camel.management.mbean
Class ManagedService

java.lang.Object
  extended by org.apache.camel.management.mbean.ManagedService
All Implemented Interfaces:
ManagedInstance, ManagedServiceMBean
Direct Known Subclasses:
ManagedConsumer, ManagedConsumerCache, ManagedEndpointRegistry, ManagedProducer, ManagedProducerCache, ManagedThrottlingInflightRoutePolicy, ManagedTypeConverterRegistry

@ManagedResource(description="Managed Service")
public class ManagedService
extends Object
implements ManagedInstance, ManagedServiceMBean


Constructor Summary
ManagedService(CamelContext context, Service service)
           
 
Method Summary
 String getCamelId()
           
 CamelContext getContext()
           
 Object getInstance()
          Gets the resource which is being managed.
 Route getRoute()
           
 String getRouteId()
           
 Service getService()
           
 String getState()
           
 void init(ManagementStrategy strategy)
           
 boolean isSupportSuspension()
           
 boolean isSuspended()
           
 void resume()
           
 void setRoute(Route route)
           
 void start()
           
 void stop()
           
 void suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedService

public ManagedService(CamelContext context,
                      Service service)
Method Detail

init

public void init(ManagementStrategy strategy)

getService

public Service getService()

getContext

public CamelContext getContext()

getRoute

public Route getRoute()

setRoute

public void setRoute(Route route)

getState

public String getState()
Specified by:
getState in interface ManagedServiceMBean

getCamelId

public String getCamelId()
Specified by:
getCamelId in interface ManagedServiceMBean

getRouteId

public String getRouteId()
Specified by:
getRouteId in interface ManagedServiceMBean

start

public void start()
           throws Exception
Specified by:
start in interface ManagedServiceMBean
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface ManagedServiceMBean
Throws:
Exception

isSupportSuspension

public boolean isSupportSuspension()
Specified by:
isSupportSuspension in interface ManagedServiceMBean

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface ManagedServiceMBean

suspend

public void suspend()
             throws Exception
Specified by:
suspend in interface ManagedServiceMBean
Throws:
Exception

resume

public void resume()
            throws Exception
Specified by:
resume in interface ManagedServiceMBean
Throws:
Exception

getInstance

public Object getInstance()
Description copied from interface: ManagedInstance
Gets the resource which is being managed.

Specified by:
getInstance in interface ManagedInstance
Returns:
the resource, such as a Processor, Consumer etc.


Apache CAMEL