org.apache.camel.management.mbean
Class ManagedService

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

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


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

@ManagedAttribute(description="Service State")
public String getState()

getCamelId

@ManagedAttribute(description="Camel id")
public String getCamelId()

getRouteId

@ManagedAttribute(description="Route id")
public String getRouteId()

start

@ManagedOperation(description="Start Service")
public void start()
           throws Exception
Throws:
Exception

stop

@ManagedOperation(description="Stop Service")
public void stop()
          throws Exception
Throws:
Exception

isSupportSuspension

@ManagedAttribute(description="Whether this service supports suspension")
public boolean isSupportSuspension()

isSuspended

@ManagedAttribute(description="Whether this service is suspended")
public boolean isSuspended()

suspend

@ManagedOperation(description="Suspend Service")
public void suspend()
             throws Exception
Throws:
Exception

resume

@ManagedOperation(description="Resume Service")
public void resume()
            throws Exception
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