|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.memcached.compat.SpyObject
net.spy.memcached.vbucket.ConfigurationProviderHTTP
public class ConfigurationProviderHTTP
| Field Summary | |
|---|---|
static String |
CLIENT_SPEC_VER
The specification version which this client meets. |
| Constructor Summary | |
|---|---|
ConfigurationProviderHTTP(List<URI> baseList)
Constructs a configuration provider with disabled authentication for the REST service |
|
ConfigurationProviderHTTP(List<URI> baseList,
String restUsr,
String restPwd)
Constructs a configuration provider with a given credentials for the REST service |
|
| Method Summary | |
|---|---|
protected static String |
buildAuthHeader(String username,
String password)
Oddly, lots of things that do HTTP seem to not know how to do this and Authenticator caches for the process. |
String |
getAnonymousAuthBucket()
Retrieves a default bucket name i.e. |
Bucket |
getBucketConfiguration(String bucketname)
Connects to the REST service and retrieves the bucket configuration from the first pool available |
Config |
getLatestConfig(String bucketname)
|
List<InetSocketAddress> |
getServerList(String bucketname)
|
void |
shutdown()
Shutdowns a monitor connections to the REST service |
void |
subscribe(String bucketName,
Reconfigurable rec)
Subscribes for configuration updates |
void |
unsubscribe(String vbucketName,
Reconfigurable rec)
Unsubscribe from updates on a given bucket and given reconfigurable |
| Methods inherited from class net.spy.memcached.compat.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLIENT_SPEC_VER
| Constructor Detail |
|---|
public ConfigurationProviderHTTP(List<URI> baseList)
throws IOException
baseList - list of urls to treat as base
IOException
public ConfigurationProviderHTTP(List<URI> baseList,
String restUsr,
String restPwd)
throws IOException
baseList - list of urls to treat as baserestUsr - usernamerestPwd - password
IOException| Method Detail |
|---|
public Bucket getBucketConfiguration(String bucketname)
throws ConfigurationException
getBucketConfiguration in interface ConfigurationProviderbucketname - bucketname
ConfigurationException
public List<InetSocketAddress> getServerList(String bucketname)
throws ConfigurationException
ConfigurationException
public void subscribe(String bucketName,
Reconfigurable rec)
throws ConfigurationException
subscribe in interface ConfigurationProviderbucketName - bucket name to receive configuration forrec - reconfigurable that will receive updates
ConfigurationException
public void unsubscribe(String vbucketName,
Reconfigurable rec)
unsubscribe in interface ConfigurationProvidervbucketName - bucket namerec - reconfigurable
public Config getLatestConfig(String bucketname)
throws ConfigurationException
ConfigurationExceptionpublic String getAnonymousAuthBucket()
ConfigurationProvider
getAnonymousAuthBucket in interface ConfigurationProviderpublic void shutdown()
shutdown in interface ConfigurationProvider
protected static String buildAuthHeader(String username,
String password)
throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||