public class BucketMonitor
extends java.util.Observable
Constructor and Description |
---|
BucketMonitor(java.net.URI cometStreamURI,
java.lang.String username,
java.lang.String password,
ConfigurationParser configParser,
ConfigurationProviderHTTP provider) |
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 BucketMonitor(java.net.URI cometStreamURI, java.lang.String username, java.lang.String password, ConfigurationParser configParser, ConfigurationProviderHTTP provider)
cometStreamURI
- the URI which will stream node changesusername
- 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.