@ManagedResource(description="ZooKeeper Endpoint") @UriEndpoint(scheme="zookeeper", title="ZooKeeper", syntax="zookeeper:serverUrls/path", consumerClass=ZooKeeperConsumer.class, label="clustering") public class ZooKeeperEndpoint extends DefaultEndpoint
ZooKeeperEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
ZooKeeperEndpoint(String uri,
ZooKeeperComponent component,
ZooKeeperConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addServer(String server) |
void |
clearServers() |
Consumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
boolean |
getAwaitExistence()
Deprecated.
The usage of this property has no effect at all.
|
long |
getBackoff() |
String |
getCamelId() |
String |
getCamelManagementName() |
ZooKeeperConfiguration |
getConfiguration() |
boolean |
getCreate() |
String |
getEndpointUri()
Returns the string representation of the endpoint URI
|
Object |
getManagedObject(ZooKeeperEndpoint arg0) |
String |
getPath() |
boolean |
getRepeat() |
List<String> |
getServers() |
String |
getState() |
int |
getTimeout() |
boolean |
isListChildren() |
boolean |
isSendEmptyMessageOnDelete() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
void |
setAwaitExistence(boolean awaitExistence)
Deprecated.
The usage of this property has no effect at all.
|
void |
setBackoff(long backoff) |
void |
setConfiguration(ZooKeeperConfiguration configuration) |
void |
setCreate(boolean shouldCreate) |
void |
setListChildren(boolean listChildren) |
void |
setPath(String path) |
void |
setRepeat(boolean shouldRepeat) |
void |
setSendEmptyMessageOnDelete(boolean sendEmptyMessageOnDelete) |
void |
setServers(List<String> servers) |
void |
setTimeout(int timeout) |
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public ZooKeeperEndpoint(String uri, ZooKeeperComponent component, ZooKeeperConfiguration configuration)
public Producer createProducer() throws Exception
Endpoint
Exception
- can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpoint
processor
- the given processorException
- can be thrownpublic boolean isSingleton()
IsSingleton
public void setConfiguration(ZooKeeperConfiguration configuration)
public ZooKeeperConfiguration getConfiguration()
@ManagedAttribute(description="Camel ID") public String getCamelId()
@ManagedAttribute(description="Camel ManagementName") public String getCamelManagementName()
@ManagedAttribute(description="Endpoint Uri", mask=true) public String getEndpointUri()
Endpoint
getEndpointUri
in interface Endpoint
getEndpointUri
in class DefaultEndpoint
@ManagedAttribute(description="Service State") public String getState()
@ManagedAttribute public void setPath(String path)
@ManagedAttribute public String getPath()
@ManagedAttribute public int getTimeout()
@ManagedAttribute public void setTimeout(int timeout)
@ManagedAttribute public boolean getRepeat()
@ManagedAttribute public void setRepeat(boolean shouldRepeat)
@ManagedAttribute public List<String> getServers()
@ManagedAttribute public void setServers(List<String> servers)
@ManagedAttribute public boolean isListChildren()
@ManagedAttribute public void setListChildren(boolean listChildren)
@ManagedAttribute public boolean getCreate()
@ManagedAttribute public void setCreate(boolean shouldCreate)
@ManagedAttribute public long getBackoff()
@ManagedAttribute public void setBackoff(long backoff)
@Deprecated @ManagedAttribute public boolean getAwaitExistence()
@Deprecated @ManagedAttribute public void setAwaitExistence(boolean awaitExistence)
@ManagedOperation public void addServer(String server)
@ManagedOperation public void clearServers()
public Object getManagedObject(ZooKeeperEndpoint arg0)
@ManagedAttribute public boolean isSendEmptyMessageOnDelete()
@ManagedAttribute public void setSendEmptyMessageOnDelete(boolean sendEmptyMessageOnDelete)
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class DefaultEndpoint
Exception
ServiceSupport.doStart()
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.