|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.z3950.zoom.Connection
Represents a connection to a Z39.50 Server, as described in the ZOOM Abstract API.
Synopsis:
Connection conn = new Connection("muffin.indexdata.dk", 210); conn.option("databaseName", "gils"); conn.option("preferredRecordSyntax", "xml");
Constructor Summary | |
Connection(java.lang.String hostname,
int portnum)
Creates a new connection object, and forges a Z39.50 connection to the server specified by the parameters. |
Method Summary | |
void |
close()
Closes the connection to the server, allowing it to release any resources it has allocated to this client. |
java.lang.String |
option(java.lang.String key)
Returns the value of the specified option in this Connection object, if it is defined there; otherwise returns the global option of that name. |
java.lang.String |
option(java.lang.String key,
java.lang.String val)
Sets the specified option in this Connection object to the specified value, returning its previous value (as would have been returned by the single-parameter version.) |
ResultSet |
search(Query q)
Performs a search on the server to which this Connection is attached, using the specified query, and returns a new Result Set object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Connection(java.lang.String hostname, int portnum)
hostname
- the name or IP address of the Z39.50 servervalue
- the IP port on which the server is listeningMethod Detail |
public java.lang.String option(java.lang.String key)
key
- the name of the requested optionGlobal.option(String)
,
zoom.z3950.org/api/zoom-1.1.html#3.2.3public java.lang.String option(java.lang.String key, java.lang.String val)
key
- the name of the option to setvalue
- the value to which to set the specified optionoption(String)
,
zoom.z3950.org/api/zoom-1.1.html#3.2.3public ResultSet search(Query q) throws SearchException, Bib1Exception
q
- A Z39.50 Query expressed as one of the
subtypes of the Query class, which see.public void close()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |