|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ORG.oclc.ber.BerConnect
BerConnect handles the I/0 between a client and a server passing BerEncoded messages.
Constructor Summary | |
BerConnect(String hostname,
int port)
Construct a connection object for the input host and port. |
|
BerConnect(String hostname,
int port,
boolean useConnectTimeout)
Construct a connection object for the input host, port and flag indicating whether the socket connect should be timed. |
|
BerConnect(String hostname,
int port,
int readTimeout)
Construct a connection object for the input host, port and read timeout. |
|
BerConnect(String hostname,
int port,
int readTimeout,
boolean useConnectTimeout)
Construct a connection object for the input host, port, read timeout, and flag indicating whether the socket connect should be timed. |
Method Summary | |
void |
close()
Closes the socket connection. |
Socket |
connection()
|
BerString |
doRequest(BerString request)
Send a request. |
BerString |
doRequest(BerString request,
boolean yieldFlag)
Send a request. |
BerString |
doRequest(BerString request,
String hostname,
int port)
Send a request. |
boolean |
sendRequest(BerString request)
Send a request. |
void |
setRetryCount(int counter)
Sets the retry count on the number of times to try to send a message where the default = 2. |
void |
setTimeout(int timeout)
Sets the read Timeout on the socket to the input number of seconds. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public BerConnect(String hostname, int port) throws UnknownHostException, IOException
hostname
- the name of the hostport
- the port to connect topublic BerConnect(String hostname, int port, int readTimeout) throws UnknownHostException, IOException
hostname
- the name of the hostport
- the port to connect toreadTimeout
- the number of seconds to wait for a read responsepublic BerConnect(String hostname, int port, boolean useConnectTimeout) throws UnknownHostException, IOException
hostname
- the name of the hostport
- the port to connect touseConnectTimeout
- flag to indicate whether the connect request
should be timed.public BerConnect(String hostname, int port, int readTimeout, boolean useConnectTimeout) throws UnknownHostException, IOException
hostname
- the name of the hostport
- the port to connect toreadTimeout
- the number of seconds to wait for a read responseuseConnectTimeout
- flag to indicate whether the connect request
should be timed.Method Detail |
public String toString()
public BerString doRequest(BerString request, String hostname, int port) throws UnknownHostException, EOFException, FileNotFoundException, IOException, InterruptedIOException
request
- a Ber encoded messagehostname
- save this hostname for re-connectsport
- save this port for re-connectspublic BerString doRequest(BerString request) throws UnknownHostException, EOFException, FileNotFoundException, IOException, InterruptedIOException
request
- a Ber encoded requestpublic BerString doRequest(BerString request, boolean yieldFlag) throws UnknownHostException, EOFException, FileNotFoundException, IOException, InterruptedIOException
request
- a Ber encoded requestyieldFlag
- a boolean indicating whether to yield before reading responsepublic boolean sendRequest(BerString request) throws UnknownHostException, EOFException, FileNotFoundException, IOException
request
- Ber encoded requestpublic void close() throws IOException
public void setTimeout(int timeout)
timeout
- the number of seconds to wait on a response from a request.public void setRetryCount(int counter)
counter
- the number of times to try sending the message before giving up.public Socket connection()
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |