|
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.sip.SipConnect
SipConnect handles the I/0 between a client and a server passing BerEncoded messages.
Constructor Summary | |
SipConnect(String hostname,
int port)
Construct a connection object. |
|
SipConnect(String hostname,
int port,
int readTimeout)
Construct a connection object. |
Method Summary | |
void |
close()
Closes the socket connection. |
Socket |
connection()
|
String |
doRequest(String request)
Send a request. |
String |
doRequest(String request,
boolean yieldFlag)
Send a request. |
String |
doRequest(String request,
String hostname,
int port)
Send a request. |
boolean |
sendRequest(String 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 SipConnect(String hostname, int port) throws UnknownHostException, IOException
hostname
- the name of the hostport
- the port to connect topublic SipConnect(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 responseMethod Detail |
public String toString()
public String doRequest(String 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 String doRequest(String request) throws UnknownHostException, EOFException, FileNotFoundException, IOException, InterruptedIOException
request
- a Ber encoded requestpublic String doRequest(String 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(String 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 |