public class Connection
extends java.lang.Object
implements com.marklogic.xcc.ContentSource
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected com.marklogic.xcc.ContentSource[] |
cs |
protected static com.marklogic.xcc.SecurityOptions |
securityOptions |
protected java.net.URI[] |
uri |
| Constructor and Description |
|---|
Connection(java.net.URI uri) |
Connection(java.net.URI[] uris) |
| Modifier and Type | Method and Description |
|---|---|
com.marklogic.xcc.spi.ConnectionProvider |
getConnectionProvider() |
com.marklogic.xcc.ContentSource |
getContentSource() |
java.util.logging.Logger |
getDefaultLogger() |
java.net.URI |
getUri() |
boolean |
isAuthenticationPreemptive() |
com.marklogic.xcc.Session |
newSession() |
com.marklogic.xcc.Session |
newSession(java.lang.String contentbaseId) |
com.marklogic.xcc.Session |
newSession(java.lang.String userName,
char[] password) |
com.marklogic.xcc.Session |
newSession(java.lang.String userName,
char[] password,
java.lang.String contentbaseId) |
com.marklogic.xcc.Session |
newSession(java.lang.String userName,
java.lang.String password)
Deprecated.
|
com.marklogic.xcc.Session |
newSession(java.lang.String userName,
java.lang.String password,
java.lang.String contentbaseId)
Deprecated.
|
protected static com.marklogic.xcc.SecurityOptions |
newTrustAnyoneOptions() |
void |
setAuthenticationPreemptive(boolean value)
Sets whether basic authentication should be attempted preemptively, default is false.
|
void |
setDefaultLogger(java.util.logging.Logger logger) |
protected java.net.URI[] uri
protected com.marklogic.xcc.ContentSource[] cs
protected volatile int count
protected static com.marklogic.xcc.SecurityOptions securityOptions
public Connection(java.net.URI uri)
throws com.marklogic.xcc.exceptions.XccException,
java.security.KeyManagementException,
java.security.NoSuchAlgorithmException
uri - com.marklogic.xcc.exceptions.XccExceptionjava.security.NoSuchAlgorithmExceptionjava.security.KeyManagementExceptionpublic Connection(java.net.URI[] uris)
throws com.marklogic.xcc.exceptions.XccException,
java.security.KeyManagementException,
java.security.NoSuchAlgorithmException
uris - com.marklogic.xcc.exceptions.XccExceptionjava.security.NoSuchAlgorithmExceptionjava.security.KeyManagementExceptionpublic java.net.URI getUri()
public com.marklogic.xcc.Session newSession()
newSession in interface com.marklogic.xcc.ContentSourcepublic boolean isAuthenticationPreemptive()
isAuthenticationPreemptive in interface com.marklogic.xcc.ContentSourcepublic void setAuthenticationPreemptive(boolean value)
Sets whether basic authentication should be attempted preemptively, default is false.
Preemptive authentication can reduce the overhead of making connections to servers that accept basic authentication by eliminating the challenge-response interaction otherwise required.
Note that misuse of preemptive authentication entails potential security risks, and under most circumstances the credentials used to authenticate will be cached after the first connection. To avoid creating the illusion that credentials are protected, connections to a server requiring digest authentication will not be retried if this flag is set.
setAuthenticationPreemptive in interface com.marklogic.xcc.ContentSourcevalue - true if basic authentication should be attempted preemptively, false otherwise.public com.marklogic.xcc.spi.ConnectionProvider getConnectionProvider()
getConnectionProvider in interface com.marklogic.xcc.ContentSourcepublic com.marklogic.xcc.ContentSource getContentSource()
public com.marklogic.xcc.Session newSession(java.lang.String userName,
char[] password)
newSession in interface com.marklogic.xcc.ContentSourcepublic com.marklogic.xcc.Session newSession(java.lang.String userName,
char[] password,
java.lang.String contentbaseId)
newSession in interface com.marklogic.xcc.ContentSourcepublic com.marklogic.xcc.Session newSession(java.lang.String contentbaseId)
newSession in interface com.marklogic.xcc.ContentSource@Deprecated
public com.marklogic.xcc.Session newSession(java.lang.String userName,
java.lang.String password)
newSession in interface com.marklogic.xcc.ContentSource@Deprecated
public com.marklogic.xcc.Session newSession(java.lang.String userName,
java.lang.String password,
java.lang.String contentbaseId)
newSession in interface com.marklogic.xcc.ContentSourcepublic java.util.logging.Logger getDefaultLogger()
getDefaultLogger in interface com.marklogic.xcc.ContentSourcepublic void setDefaultLogger(java.util.logging.Logger logger)
setDefaultLogger in interface com.marklogic.xcc.ContentSourceprotected static com.marklogic.xcc.SecurityOptions newTrustAnyoneOptions()
throws java.security.KeyManagementException,
java.security.NoSuchAlgorithmException
java.security.KeyManagementExceptionjava.security.NoSuchAlgorithmException