|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.datastax.driver.core.SimpleAuthInfoProvider
public class SimpleAuthInfoProvider
A simple AuthInfoProvider
implementation.
This provider allows to programmatically define authentication information that will then apply to all hosts.
Note that it is not safe to add new info to this provider once a Cluster instance has been created using this provider.
Field Summary |
---|
Fields inherited from interface com.datastax.driver.core.AuthInfoProvider |
---|
NONE |
Constructor Summary | |
---|---|
SimpleAuthInfoProvider()
Creates a new, empty, simple authentication info provider. |
|
SimpleAuthInfoProvider(Map<String,String> properties)
Creates a new simple authentication info provider with the information contained in properties . |
Method Summary | |
---|---|
SimpleAuthInfoProvider |
add(String property,
String value)
Adds a new property to the authentication info returned by this provider. |
SimpleAuthInfoProvider |
addAll(Map<String,String> properties)
Adds all the key-value pair provided as new authentication information returned by this provider. |
Map<String,String> |
getAuthInfo(InetAddress host)
The authentication information to use to connect to host . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleAuthInfoProvider()
public SimpleAuthInfoProvider(Map<String,String> properties)
properties
.
properties
- a map of authentication information to use.Method Detail |
---|
public Map<String,String> getAuthInfo(InetAddress host)
AuthInfoProvider
host
.
Please note that if authentication is required, this method will be
called to initialize each new connection created by the driver. It is
thus a good idea to make sure this method returns relatively quickly.
getAuthInfo
in interface AuthInfoProvider
host
- the Cassandra host for which authentication information
are requested.
public SimpleAuthInfoProvider add(String property, String value)
property
- the name of the property to add.value
- the value to add for property
.
this
object.public SimpleAuthInfoProvider addAll(Map<String,String> properties)
properties
- a map of authentication information to add.
this
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |