|
XCC/J 3.1-9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.marklogic.xcc.ContentSourceFactory
Static helper class with factory methods to
create instances of ContentSource using explicit connection parameters.
ContentSource| Method Summary | |
static ContentSource |
newContentSource(ConnectionProvider connectionProvider,
String user,
String password,
String contentbaseName)
Return a ContentSource object that will use the provided
ConnectionProvider instance to obtain server connections,
with the given default login credentials and contentbase values. |
static ContentSource |
newContentSource(String host,
int port)
Return a ContentSource object that will serve as the source of connections to the server on the given host and port, with no default login credentials. |
static ContentSource |
newContentSource(String host,
int port,
String user,
String password)
Equivalent to newContentSource (host, port, user, password, null) |
static ContentSource |
newContentSource(String host,
int port,
String user,
String password,
String contentbaseName)
Return a ContentSource object that will serve as the source of connections
to the server on the given host and port, with login credentials of
the given user and password. |
static ContentSource |
newContentSource(URI uri)
Return a ContentSource object that will serve as the source of connections
to the server specified by the given URI. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ContentSource newContentSource(ConnectionProvider connectionProvider,
String user,
String password,
String contentbaseName)
Return a ContentSource object that will use the provided
ConnectionProvider instance to obtain server connections,
with the given default login credentials and contentbase values.
Custom connection management policies may be implemented by the
ConnectionProvider object.
NOTE:
This factory method should only be used by advanced users.
A misbehaving ConnectionProvider
implementation can result in connection failures and potentially
even data loss. Be sure you know what you're doing.
connectionProvider - An instance of ConnectionProvider that will
be used to obtain sockets to connect to the ContentSource when needed.
The client is responsible for properly initializing this object with the
information it needs to make the appropriate connections.user - The default User Name to use for authentication.password - The default Password to use for authentication.contentbaseName - The contentbase (database) on the
ContentSource to run
queries against. Pass null to use the default configured on the server.
ContentSource instance representing the ContentSource.ContentSource
public static ContentSource newContentSource(URI uri)
throws XccConfigException
Return a ContentSource object that will serve as the source of connections
to the server specified by the given URI. The format of the URI is:
xcc://user:password@host:port/contentbase
For example: xcc://joe:hush@myserver:8003
For example: xcc://joe:hush@myserver:8003/production
The contentbase id is optional. If not specified the default database for the XDBC server configuration will be used.
The only supported connection scheme is currently "xcc" ("xdbc" is an alias), but others may be added in the future.
uri - A URI instance which encodes the connection scheme, host, port and
optional user and password.
ContentSource instance representing the ContentSource.
XccConfigException - If there is a configuration problem or
the configured ContentSource implementation class cannot be instantiated.ContentSource
public static ContentSource newContentSource(String host,
int port,
String user,
String password,
String contentbaseName)
ContentSource object that will serve as the source of connections
to the server on the given host and port, with login credentials of
the given user and password. No connections are made at this time.
Note that the ContentSource instance returned may be shared with
other callers or threads. The implementation may choose to pool
and re-use ContentSource objects for a particular host/port/user
combination.
host - The name or dotted-quad IP address of the server host.port - The port on the host to connect to.user - The default User Name to use for authentication.password - The default Password to use for authentication.contentbaseName - The ContentBase (database) on the ContentSource run
queries against. Pass null to use the default configured on the server.
ContentSource instance representing the ContentSource.ContentSource
public static ContentSource newContentSource(String host,
int port,
String user,
String password)
newContentSource (host, port, user, password, null)
host - The name or dotted-quad IP address of the server host.port - The port on the host to connect to.user - The default User Name to use for authentication.password - The default Password to use for authentication.
ContentSource instance representing the ContentSource.
the configured ContentSource implementation class cannot be instantiated.ContentSource
public static ContentSource newContentSource(String host,
int port)
host - The name or dotted-quad IP address of the server host.port - The port on the host to connect to.
ContentSource
|
XCC/J 3.1-9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com