public class HohClientSimple extends AbstractClient<HohRawClientSimple> implements IClientSimple
Constructor and Description |
---|
HohClientSimple(String theHost,
int thePort,
String theUriPath)
Constructor
|
HohClientSimple(String theHost,
int thePort,
String theUriPath,
Parser theParser)
Constructor
|
HohClientSimple(URL theUrl)
Constructor
|
HohClientSimple(URL theUrl,
Parser theParser)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
If a socket exists and it is connected, closes the socket.
|
boolean |
isAutoClose() |
boolean |
isConnected() |
void |
setAutoClose(boolean theAutoClose)
Sets the auto-close property.
|
getHost, getParser, getPort, getRawClient, getSocketFactory, getSoTimeout, getUriPath, getUrl, getUrlString, isKeepAlive, sendAndReceiveMessage, sendAndReceiveMessage, setAuthorizationCallback, setCharset, setHost, setKeepAlive, setParser, setPort, setResponseTimeout, setSigner, setSocketFactory, setSoTimeout, setUriPath, setUrl, setUrlString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHost, getPort, getSocketFactory, getSoTimeout, getUriPath, getUrl, getUrlString, isKeepAlive, setAuthorizationCallback, setCharset, setHost, setKeepAlive, setPort, setResponseTimeout, setSigner, setSocketFactory, setSoTimeout, setUriPath, setUrl, setUrlString
public HohClientSimple(String theHost, int thePort, String theUriPath)
theHost
- The HOST (name/address). E.g. "192.168.1.1"thePort
- The PORT. E.g. "8080"theUriPath
- The URI being requested (must either be blank or start with
'/' and contain a path). E.g. "/Apps/Receiver.jsp"public HohClientSimple(String theHost, int thePort, String theUriPath, Parser theParser)
theHost
- The HOST (name/address). E.g. "192.168.1.1"thePort
- The PORT. E.g. "8080"theUriPath
- The URI being requested (must either be blank or start with
'/' and contain a path). E.g. "/Apps/Receiver.jsp"theParser
- The Parser to use, or null
in which case a
PipeParser will be usedpublic HohClientSimple(URL theUrl)
theUrl
- The URL to send messages topublic HohClientSimple(URL theUrl, Parser theParser)
theUrl
- The URL to send messages totheParser
- The Parser to use, or null
in which case a
PipeParser will be usedpublic void close()
auto close
mode is falseclose
in interface IClientSimple
public boolean isAutoClose()
isAutoClose
in interface IClientSimple
IClientSimple.setAutoClose(boolean)
public boolean isConnected()
isConnected
in interface IClientSimple
public void setAutoClose(boolean theAutoClose)
Sets the auto-close property. If set to true (which is the default), the
client will close the socket between each request. If set to
false
, the client will keep the socket open between
requests.
If auto-close is disabled, sockets will never automatically disconnect,
which some servers may not like. The socket can still be closed by
calling IClientSimple.close()
.
setAutoClose
in interface IClientSimple
Copyright © 2012–2017 University Health Network. All rights reserved.