public class BucketMonitor
extends java.util.Observable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLIENT_SPEC_VER
The specification version which this client meets.
|
Constructor and Description |
---|
BucketMonitor(java.net.URI cometStreamURI,
java.lang.String bucketname,
java.lang.String username,
java.lang.String password,
ConfigurationParser configParser) |
Modifier and Type | Method and Description |
---|---|
protected org.jboss.netty.channel.ChannelFuture |
createChannel() |
java.lang.String |
getHttpPass() |
java.lang.String |
getHttpUser() |
protected void |
notifyDisconnected()
Take any action required when the monitor appears to be disconnected.
|
protected org.jboss.netty.handler.codec.http.HttpRequest |
prepareRequest(java.net.URI uri,
java.lang.String h) |
protected void |
replaceConfig()
Replace the previously received configuration with the current one.
|
void |
setConfigParser(ConfigurationParser newConfigParser) |
void |
shutdown()
Shut down the monitor in a graceful way (and release all resources).
|
void |
shutdown(long timeout,
java.util.concurrent.TimeUnit unit)
Shut down this monitor in a graceful way.
|
void |
startMonitor() |
public static final java.lang.String CLIENT_SPEC_VER
public BucketMonitor(java.net.URI cometStreamURI, java.lang.String bucketname, java.lang.String username, java.lang.String password, ConfigurationParser configParser)
cometStreamURI
- the URI which will stream node changesbucketname
- the bucketToMonitor name we are monitoringusername
- the username required for HTTP Basic Auth to the restful
servicepassword
- the password required for HTTP Basic Auth to the restful
serviceprotected void notifyDisconnected()
public void startMonitor()
protected org.jboss.netty.channel.ChannelFuture createChannel()
protected org.jboss.netty.handler.codec.http.HttpRequest prepareRequest(java.net.URI uri, java.lang.String h)
public java.lang.String getHttpUser()
public java.lang.String getHttpPass()
public void shutdown()
public void shutdown(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- unit
- protected void replaceConfig()
public void setConfigParser(ConfigurationParser newConfigParser)
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.