|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.ServiceRequest
public class ServiceRequest
ServoceRequest tools
Nested Class Summary | |
---|---|
static class |
ServiceRequest.Authorization
Authorization class |
static interface |
ServiceRequest.RequestBody
Request Body handler class |
Field Summary | |
---|---|
static java.lang.String |
AUTH_ENCODING_PREFIX
|
protected static java.lang.String |
METHOD_handleRequest
|
protected static java.lang.String |
SRATTR_account
|
protected static java.lang.String |
SRATTR_auth
|
protected static java.lang.String |
SRATTR_code
|
protected static java.lang.String |
SRATTR_command
|
protected static java.lang.String |
SRATTR_password
|
protected static java.lang.String |
SRATTR_result
|
protected static java.lang.String |
SRATTR_user
|
protected static java.lang.String |
SRTAG_Authorization
|
protected static java.lang.String |
SRTAG_GTSRequest
|
protected static java.lang.String |
SRTAG_GTSResponse
|
protected static java.lang.String |
SRTAG_Message
|
Constructor Summary | |
---|---|
ServiceRequest()
Constructor |
|
ServiceRequest(javax.management.remote.JMXServiceURL jmxURL,
java.lang.String jmxObjName)
Constructor |
|
ServiceRequest(ServiceRequest other)
Clone Constructor |
|
ServiceRequest(java.lang.String url)
Constructor |
|
ServiceRequest(java.net.URL serviceURL)
Constructor |
Method Summary | |
---|---|
protected byte[] |
_sendRequest_HTTP(java.lang.String reqXMLStr,
int timeoutMS)
Sends the request and returns the results as an XML Document |
protected byte[] |
_sendRequest_JMX(java.lang.String reqXMLStr)
Sends the request and returns the results as an XML Document |
protected org.w3c.dom.Document |
_sendRequest(java.lang.String reqXMLStr,
int timeoutMS)
Sends the request and returns the results as an XML Document |
java.lang.StringBuffer |
appendRequestBody(java.lang.StringBuffer sb,
int indent)
Appends the request body to the specified StringBuffer |
java.lang.String |
getAttrAccount()
|
java.lang.String |
getAttrAuth()
|
java.lang.String |
getAttrCommand()
|
java.lang.String |
getAttrPassword()
|
java.lang.String |
getAttrResult()
|
java.lang.String |
getAttrUser()
|
java.lang.String |
getCommand()
Gets the command ID included in the request header |
java.lang.String |
getJMXObjectName()
Gets the JMX service object name |
javax.management.remote.JMXServiceURL |
getJMXServiceURL()
Gets the service URL |
java.lang.String |
getTagAuthorization()
|
java.lang.String |
getTagRequest()
|
java.lang.String |
getTagResponse()
|
java.net.URL |
getURL()
Gets the service URL |
boolean |
isJMX()
Returns true if this is a JMX request |
org.w3c.dom.Document |
sendRequest(java.io.File reqFile)
Sends the request and returns the results as an XML Document |
org.w3c.dom.Document |
sendRequest(java.lang.String command,
ServiceRequest.RequestBody rb)
Sends the request and returns the results as an XML Document |
ServiceRequest |
setAuthorization(ServiceRequest.Authorization auth)
Sets the Service Authorization |
ServiceRequest |
setAuthorization(java.lang.String acctID,
java.lang.String userID,
java.lang.String passwd,
java.lang.String authKey)
Sets the Service Authorization |
ServiceRequest |
setCommand(java.lang.String cmd)
Sets the command ID included in the request header |
void |
setJMXObjectName(java.lang.String objName)
Sets the JMX service object name |
ServiceRequest |
setRequestBody(ServiceRequest.RequestBody rb)
Sets the request body handler |
ServiceRequest |
setURL(javax.management.remote.JMXServiceURL url,
java.lang.String jmxObjName)
Sets the service URL |
ServiceRequest |
setURL(java.lang.String url)
Sets the service URL |
ServiceRequest |
setURL(java.net.URL url)
Sets the service URL |
java.lang.String |
toString()
Returns a XML string representation of this instance |
java.lang.String |
toXML(java.lang.String command,
ServiceRequest.RequestBody rb)
Assembles and returns an XML request string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String SRTAG_GTSRequest
protected static final java.lang.String SRTAG_GTSResponse
protected static final java.lang.String SRTAG_Message
protected static final java.lang.String SRTAG_Authorization
protected static final java.lang.String SRATTR_command
protected static final java.lang.String SRATTR_result
protected static final java.lang.String SRATTR_code
protected static final java.lang.String SRATTR_account
protected static final java.lang.String SRATTR_user
protected static final java.lang.String SRATTR_password
protected static final java.lang.String SRATTR_auth
protected static final java.lang.String METHOD_handleRequest
public static final java.lang.String AUTH_ENCODING_PREFIX
Constructor Detail |
---|
public ServiceRequest()
public ServiceRequest(ServiceRequest other)
public ServiceRequest(java.lang.String url) throws java.net.MalformedURLException
url
- The Service URL
java.net.MalformedURLException
public ServiceRequest(java.net.URL serviceURL)
serviceURL
- The Service URLpublic ServiceRequest(javax.management.remote.JMXServiceURL jmxURL, java.lang.String jmxObjName)
jmxURL
- The JMX Service URLMethod Detail |
---|
public ServiceRequest setURL(java.lang.String url) throws java.net.MalformedURLException
url
- The Service URL
java.net.MalformedURLException
public ServiceRequest setURL(java.net.URL url)
url
- The Service URL
public java.net.URL getURL()
public ServiceRequest setURL(javax.management.remote.JMXServiceURL url, java.lang.String jmxObjName)
url
- The Service URL
public javax.management.remote.JMXServiceURL getJMXServiceURL()
public boolean isJMX()
public void setJMXObjectName(java.lang.String objName)
objName
- The JMX service object namepublic java.lang.String getJMXObjectName()
public ServiceRequest setAuthorization(java.lang.String acctID, java.lang.String userID, java.lang.String passwd, java.lang.String authKey)
acctID
- The Authorization account IDuserID
- The Authorization user IDpasswd
- The Authorization password
public ServiceRequest setAuthorization(ServiceRequest.Authorization auth)
auth
- The Authorization wrapper
public ServiceRequest setCommand(java.lang.String cmd)
cmd
- The command ID
public java.lang.String getCommand()
public ServiceRequest setRequestBody(ServiceRequest.RequestBody rb)
rb
- The RequestBody handler
public java.lang.StringBuffer appendRequestBody(java.lang.StringBuffer sb, int indent)
sb
- The StringBufferindent
- The prefixing spaces to include
public java.lang.String toXML(java.lang.String command, ServiceRequest.RequestBody rb)
command
- The command ID to include in the headerrb
- The RequestBody handler
public java.lang.String toString()
toString
in class java.lang.Object
public org.w3c.dom.Document sendRequest(java.lang.String command, ServiceRequest.RequestBody rb) throws java.io.IOException
java.io.IOException
public org.w3c.dom.Document sendRequest(java.io.File reqFile) throws java.io.IOException
java.io.IOException
protected org.w3c.dom.Document _sendRequest(java.lang.String reqXMLStr, int timeoutMS) throws java.io.IOException
java.io.IOException
protected byte[] _sendRequest_JMX(java.lang.String reqXMLStr) throws java.io.IOException
java.io.IOException
protected byte[] _sendRequest_HTTP(java.lang.String reqXMLStr, int timeoutMS) throws java.io.IOException
java.io.IOException
public java.lang.String getTagResponse()
public java.lang.String getTagRequest()
public java.lang.String getTagAuthorization()
public java.lang.String getAttrCommand()
public java.lang.String getAttrResult()
public java.lang.String getAttrAccount()
public java.lang.String getAttrUser()
public java.lang.String getAttrPassword()
public java.lang.String getAttrAuth()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |