public abstract class AbstractCamelClusterService<T extends org.apache.camel.cluster.CamelClusterView>
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.cluster.CamelClusterService
Modifier | Constructor and Description |
---|---|
protected |
AbstractCamelClusterService() |
protected |
AbstractCamelClusterService(String id) |
protected |
AbstractCamelClusterService(String id,
org.apache.camel.CamelContext camelContext) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createView(String namespace) |
protected void |
doStart() |
protected void |
doStop() |
Map<String,Object> |
getAttributes() |
org.apache.camel.CamelContext |
getCamelContext() |
String |
getId() |
Collection<String> |
getNamespaces() |
int |
getOrder() |
org.apache.camel.cluster.CamelClusterView |
getView(String namespace) |
boolean |
isLeader(String namespace) |
void |
releaseView(org.apache.camel.cluster.CamelClusterView view) |
void |
setAttribute(String key,
Object value) |
void |
setAttributes(Map<String,Object> attributes) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setId(String id) |
void |
setOrder(int order) |
void |
startView(String namespace) |
void |
stopView(String namespace) |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected AbstractCamelClusterService()
protected AbstractCamelClusterService(String id)
protected AbstractCamelClusterService(String id, org.apache.camel.CamelContext camelContext)
public int getOrder()
getOrder
in interface org.apache.camel.cluster.CamelClusterService
getOrder
in interface org.apache.camel.Ordered
public void setOrder(int order)
public void setId(String id)
setId
in interface org.apache.camel.spi.IdAware
public String getId()
getId
in interface org.apache.camel.spi.HasId
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public Map<String,Object> getAttributes()
getAttributes
in interface org.apache.camel.cluster.CamelClusterService
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.BaseService
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.BaseService
Exception
public org.apache.camel.cluster.CamelClusterView getView(String namespace) throws Exception
getView
in interface org.apache.camel.cluster.CamelClusterService
Exception
public void releaseView(org.apache.camel.cluster.CamelClusterView view) throws Exception
releaseView
in interface org.apache.camel.cluster.CamelClusterService
Exception
public Collection<String> getNamespaces()
getNamespaces
in interface org.apache.camel.cluster.CamelClusterService
public void startView(String namespace) throws Exception
startView
in interface org.apache.camel.cluster.CamelClusterService
Exception
public void stopView(String namespace) throws Exception
stopView
in interface org.apache.camel.cluster.CamelClusterService
Exception
public boolean isLeader(String namespace)
isLeader
in interface org.apache.camel.cluster.CamelClusterService
Apache Camel