|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.universaldevices.soap.UDSOAPRequest
public class UDSOAPRequest
UDSOAPRequest
encapsulates all the necessary methods for
sending Web Services/SOAP requests to ISY.
It also takes care of all the security level related tasks
Constructor Summary | |
---|---|
protected |
UDSOAPRequest(AbstractHTTPRequest request,
UDProxyDevice dev)
Constructor |
Method Summary | |
---|---|
static UDSOAPRequest |
create(boolean isSSL,
java.net.InetSocketAddress address,
java.lang.String method,
java.lang.String url_path,
java.lang.String httpCredentials,
UDProxyDevice dev)
UDSOAPRequest factory method |
java.lang.StringBuffer |
getSOAPEnvelope(short signatureType,
java.lang.String soapAction,
java.lang.StringBuffer body)
Same as getSOAPEnvelope with no attributes |
java.lang.StringBuffer |
getSOAPEnvelope(short signatureType,
java.lang.String soapAction,
java.lang.String attributes,
java.lang.StringBuffer body)
Returns the SOAPEnvelope |
void |
setSocketTimeoutMillis(int v)
Sets the number of milliseconds before the socket times out. |
UDHTTPResponse |
submit(java.lang.StringBuffer body,
java.lang.String soapAction,
short signatureType,
boolean encrypt,
boolean keep_alive)
Same as submit without attributes |
UDHTTPResponse |
submit(java.lang.StringBuffer body,
java.lang.String soapAction,
java.lang.String attributes,
short signatureType,
boolean encrypt,
boolean keep_alive)
Submits a SOAP Web Services request to ISY |
UDHTTPResponse |
subscribe(boolean keep_alive,
java.lang.String local_host,
int port)
Subscribe to ISY events |
UDHTTPResponse |
unsubscribe()
Unsubscribe from ISY events |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected UDSOAPRequest(AbstractHTTPRequest request, UDProxyDevice dev)
request
- - the pre-built AbstractHTTPRequestdev
- - the UDProxyDevice
which this request is being issued
againstMethod Detail |
---|
public void setSocketTimeoutMillis(int v)
public UDHTTPResponse subscribe(boolean keep_alive, java.lang.String local_host, int port)
keep_alive
- - whether or not the socket should be kept alive: ISY event
notification engine shall use this same socket to notify the client of
changeslocal_host
- - if keep_alive is false, then this is the IP of the local
host which is to be notified of changes. Otherwise, this parameter has no
significanceport
- if keep_alive is false, then this is the port of the local
host which is to be notified of changes. Otherwise, this parameter has no
significance
UDHTTPResponse
UDHTTPResponse
,
UDProxyDevice
public UDHTTPResponse unsubscribe()
UDHTTPResponse
UDHTTPResponse
public java.lang.StringBuffer getSOAPEnvelope(short signatureType, java.lang.String soapAction, java.lang.String attributes, java.lang.StringBuffer body)
signatureType
- - the type of signature to be used (all defined in
UPnPSecurity
:
NO_SIGNATURE = 0;
SIGN_WITH_PUBLIC_KEY = 1;
SIGN_WITH_HMAC_KEY = 2;soapAction
- - the SOAP Actionattributes
- - attributes for the message. Note that attribute are added as isbody
- - the body to be included in the s:Body element of SOAPEnvelope
public java.lang.StringBuffer getSOAPEnvelope(short signatureType, java.lang.String soapAction, java.lang.StringBuffer body)
signatureType
- soapAction
- body
-
public UDHTTPResponse submit(java.lang.StringBuffer body, java.lang.String soapAction, java.lang.String attributes, short signatureType, boolean encrypt, boolean keep_alive)
body
- - the body to be included in the s:Body element of SOAPEnvelopesoapAction
- - the SOAP Actionattributes
- signatureType
- - the type of signature to be used (all defined in
UPnPSecurity
:
NO_SIGNATURE = 0;
SIGN_WITH_PUBLIC_KEY = 1;
SIGN_WITH_HMAC_KEY = 2;Dencrypt
- - whether or not to encrypt the contents (of payload)keep_alive
- - whether or not to keep the socket open
UDHTTPResponse
public UDHTTPResponse submit(java.lang.StringBuffer body, java.lang.String soapAction, short signatureType, boolean encrypt, boolean keep_alive)
body
- soapAction
- signatureType
- encrypt
- keep_alive
-
UDHTTPResponse
public static UDSOAPRequest create(boolean isSSL, java.net.InetSocketAddress address, java.lang.String method, java.lang.String url_path, java.lang.String httpCredentials, UDProxyDevice dev)
UDSOAPRequest factory method
isSSL
- - whether or not to return UDHTTPRequest or UDHTTPSRequestaddress
- - 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)httpCredentials
- - the Authorization header (use UDHTTPUtil.getHTTPAuthorization())dev
- - the UDProxyDevice representing an instance of ISY
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |