|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.nxqd.NxqdManager
public class NxqdManager
The class NxqdManager is the main class for
communicating with the Nxqd Apache module.
| Field Summary | |
|---|---|
static String |
NXQD_PORT
The constant NXQD_PORT specifies the default port
in case it is not specified in the URI. |
| Constructor Summary | |
|---|---|
NxqdManager(String host)
Creates a new NxqdManager instance which will connect
to the specified host on the default port. |
|
NxqdManager(String host,
String port)
The a new NxqdManager constructor creates a new instance
of this driver. |
|
| Method Summary | |
|---|---|
void |
addNxqdContainerEventListener(NxqdContainerEventListener cl)
|
void |
addNxqdManagerEventListener(NxqdManagerEventListener ml)
|
void |
connect()
|
boolean |
containerExists(String containerName)
The containerExists method checks if
the specified container exists. |
NxqdContainer |
createContainer(String containerName)
The createContainer method creates
the specified container A NxqdException is thrown if
the container already exists. |
NxqdModify |
createModify()
The createModify method will create an
XmlModify object. |
void |
deleteContainer(NxqdContainer container)
The deleteContainer method deletes the
specifed container. |
void |
deleteContainer(String containerName)
The deleteContainer method deletes the
specifed container. |
void |
disconnect()
|
NxqdContainer |
getContainer(String containerName)
The getContainer method returns a handle
to the specified container. |
String |
getHostName()
The getHostName method returns the host name
of the machine running the Nxqd server. |
String |
getHostPort()
The getHostPort method returns the host port
of the remote Nxqd server. |
List |
getResults(int numResults,
String sessionID,
int queryID)
The getResults method will retrieve the results after a
|
String |
getSessionId()
The getSessionId method returns the session id which
identifies the client for this session. |
boolean |
isConnected()
|
int |
lazyQuery(String queryExpression,
Map nameSpaces,
String sessionID)
The lazyQuery method executes the specified queryExpression
on this database. |
List |
listContainers()
The listContainers method returns a List containing
the container names managed by the server. |
NxqdQueryExpression |
prepare(String query)
Describe prepare method here. |
List |
query(String queryExpression)
The query method executes the specified queryExpression
on this database. |
List |
query(String queryExpression,
Map nameSpaces)
The query method executes the specified queryExpression
on this database. |
void |
removeNxqdContainerEventListener(NxqdContainerEventListener cl)
|
void |
removeNxqdManagerEventListener(NxqdManagerEventListener ml)
|
void |
renameContainer(String oldName,
String newName)
The renameContainer method creates
the specified container A NxqdException is thrown if
the container already exists. |
void |
setContainerEventPeriod(long ms)
The setContainerEventPeriod method sets the polling period for retrieving the
container event queue from the server. |
void |
setManagerEventPeriod(long ms)
The setManagerEventPeriod method sets the polling period for retrieving the
manager event queue from the server. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NXQD_PORT
NXQD_PORT specifies the default port
in case it is not specified in the URI.
| Constructor Detail |
|---|
public NxqdManager(String host)
NxqdManager instance which will connect
to the specified host on the default port.
host - a String value indicating the hostname of the
machine running the Nxqd server.
public NxqdManager(String host,
String port)
NxqdManager constructor creates a new instance
of this driver.
host - a String value indicating the hostname of the
machine running the Nxqd server.port - an int value specifying the port of the
Nxqd server.| Method Detail |
|---|
public final String getHostName()
getHostName method returns the host name
of the machine running the Nxqd server.
String valuepublic final String getHostPort()
getHostPort method returns the host port
of the remote Nxqd server.
String value
public void connect()
throws NxqdException
NxqdException
public void disconnect()
throws NxqdException
NxqdExceptionpublic boolean isConnected()
public String getSessionId()
getSessionId method returns the session id which
identifies the client for this session.
String value
public NxqdContainer createContainer(String containerName)
throws NxqdException
createContainer method creates
the specified container A NxqdException is thrown if
the container already exists.
containerName - a String value
NxqdContainer value
NxqdException - if an error occurs
public void renameContainer(String oldName,
String newName)
throws NxqdException
renameContainer method creates
the specified container A NxqdException is thrown if
the container already exists.
oldName - a String indicating the container you want to renamenewName - a String indicating the new name for the container
NxqdException - if an error occurs
public void deleteContainer(String containerName)
throws NxqdException
deleteContainer method deletes the
specifed container. A NxqdException is thrown if
the container does not exist.
containerName - a String value
NxqdException - if an error occurs
public void deleteContainer(NxqdContainer container)
throws NxqdException
deleteContainer method deletes the
specifed container. A NxqdException is thrown if
the container does not exist.
container - a NxqdContainer value
NxqdException - if an error occurs
public NxqdContainer getContainer(String containerName)
throws NxqdException
getContainer method returns a handle
to the specified container. A NxqdException is thrown if
the container does not exist.
containerName - a String value
NxqdContainer value
NxqdException - if an error occurs
public boolean containerExists(String containerName)
throws NxqdException
containerExists method checks if
the specified container exists. It will return
true if the container exists, false otherwise.
A NxqdException is thrown if other errors occur.
containerName - a String value
boolean value
NxqdException - if an error occurs
public List listContainers()
throws NxqdException
listContainers method returns a List containing
the container names managed by the server. This list may
be empty, but it will never be null.
List value
NxqdException - if an error occurs
public List query(String queryExpression)
throws NxqdException
query method executes the specified queryExpression
on this database. No preprocessing of the query is performed.
queryExpression - a String value
List value which will contain XML fragments
as String objects.
NxqdException - if an error occurs
public List query(String queryExpression,
Map nameSpaces)
throws NxqdException
query method executes the specified queryExpression
on this database. No preprocessing of the query is performed.
queryExpression - a String valuenameSpaces - a Map value
List value which will contain XML fragments
as String objects.
NxqdException - if an error occurs
public int lazyQuery(String queryExpression,
Map nameSpaces,
String sessionID)
throws NxqdException
lazyQuery method executes the specified queryExpression
on this database. No preprocessing of the query is performed. This querying
is different from query in the way that no result is returned. Results can be
retrieved by calling getResults
queryExpression - a String valuenameSpaces - a Map valuesessionID - a String value representing the client's session; retrieved using getSessionId()
int value which will retrieve the query id if the query was successful
The query id retrieved has to be submitted to get_results to get the results associated with
the lazy query. If query is unsuccessful, return 0.
NxqdException - if an error occurs
public List getResults(int numResults,
String sessionID,
int queryID)
throws NxqdException
getResults method will retrieve the results after a
lazyQuery has been executed.
- Parameters:
numResults - a int value to specify how many results to retrievesessionID - a String value to specify which client's sessionqueryID - a int value retrieved from lazyQuery
- Throws:
NxqdException
public NxqdModify createModify()
throws NxqdException
createModify method will create an
XmlModify object.
NxqdModify value
NxqdException - if an error occurs
public NxqdQueryExpression prepare(String query)
throws NxqdException
prepare method here.
query - a String The XQuery query string to compile.
NxqdQueryExpression value
NxqdException - if an error occurspublic void addNxqdContainerEventListener(NxqdContainerEventListener cl)
public void removeNxqdContainerEventListener(NxqdContainerEventListener cl)
public void setContainerEventPeriod(long ms)
setContainerEventPeriod method sets the polling period for retrieving the
container event queue from the server.
ms - an long value represeting the pollingperiod in milliseconds.
Defaults to 5000.public void addNxqdManagerEventListener(NxqdManagerEventListener ml)
public void removeNxqdManagerEventListener(NxqdManagerEventListener ml)
public void setManagerEventPeriod(long ms)
setManagerEventPeriod method sets the polling period for retrieving the
manager event queue from the server.
ms - an long value represeting the pollingperiod in milliseconds.
Defaults to 5000.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||