public class UDHTTPSRequest extends AbstractHTTPRequest
UDHTTPSPRequest
class encapsulates an HTTPS request to ISY.
This class may also be used for other types of HTTPS request and it's the
superclass to UDSOAPRequest
UDSOAPRequest
Modifier and Type | Field and Description |
---|---|
protected javax.net.ssl.SSLSocket |
s
The socket, which in some cases, remains open even after
the request is completed
|
address, ba, closed, credentials, hostName, is, method, os, sc, SEND_BUFFER_SIZE, url_path
Modifier | Constructor and Description |
---|---|
protected |
UDHTTPSRequest(java.lang.String hostName,
java.net.InetSocketAddress address,
java.lang.String url_path)
Constructor
|
protected |
UDHTTPSRequest(java.lang.String hostName,
java.net.InetSocketAddress address,
java.lang.String method,
java.lang.String url_path)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static void |
cleanUp() |
void |
close(int status)
Releases all the resources
|
java.lang.String |
getProtocol() |
UDHTTPResponse |
getServerResponse(java.lang.StringBuffer header,
java.lang.StringBuffer body,
boolean keep_alive,
java.lang.Object device)
Issues the request to the server and returns the response
|
java.net.Socket |
getSocket() |
static void |
initHTTPS() |
boolean |
isSSL() |
UDHTTPResponse |
post(java.lang.StringBuffer header,
byte[] body,
boolean keep_alive,
java.lang.Object device,
IUpdaterClient view)
Simple post
|
create, create, create, get, getFile, getHeader, getHost, getHostAndPort, getPort, getServerResponse, getSocketTimeoutMillis, getURL, post, setSendBufferSize, setSocketTimeoutMillis
protected javax.net.ssl.SSLSocket s
protected UDHTTPSRequest(java.lang.String hostName, java.net.InetSocketAddress address, java.lang.String method, java.lang.String url_path)
hostName
- - the actual HOST header name to be used in the calladdress
- - the address segment of the URL including portmethod
- - the method either GET or POSTurl_path
- - the path segment of the URL (i.e. /web/nodescnf.xml)protected UDHTTPSRequest(java.lang.String hostName, java.net.InetSocketAddress address, java.lang.String url_path)
Note: the method is defaulted to "GET"
hostName
- - the actual HOST header name to be used in the calladdress
- - the address segment of the URL including porturl_path
- - the path segment of the URL (i.e. /web/nodescnf.xml)public static void cleanUp()
public static void initHTTPS()
public java.lang.String getProtocol()
getProtocol
in class AbstractHTTPRequest
public UDHTTPResponse getServerResponse(java.lang.StringBuffer header, java.lang.StringBuffer body, boolean keep_alive, java.lang.Object device)
The response is of type UDHTTPResponse
Use this method to encapuslate requests to ISY
getServerResponse
in class AbstractHTTPRequest
header
- - the header for the requestbody
- - the body for the request if any (in case of POST)keep_alive
- - whether or not the connection should be kept alivedevice
- - the UDProxyDevice
objectUDHTTPResponse
UDHTTPResponse
,
UDProxyDevice
public UDHTTPResponse post(java.lang.StringBuffer header, byte[] body, boolean keep_alive, java.lang.Object device, IUpdaterClient view)
AbstractHTTPRequest
The response is of type UDHTTPResponse
Use this method to encapuslate requests to ISY
post
in class AbstractHTTPRequest
header
- - the header for the requestbody
- - the body for the request if any (in case of POST)keep_alive
- - whether or not the connection should be kept alivedevice
- - the UDProxyDevice
objectUDHTTPResponse
UDHTTPResponse
,
UDProxyDevice
public void close(int status)
Releases all resources and closes all the connection which this object holds
close
in class AbstractHTTPRequest
status
- - @depracatedpublic java.net.Socket getSocket()
getSocket
in class AbstractHTTPRequest
public boolean isSSL()
isSSL
in class AbstractHTTPRequest