public class Interface_Client
extends java.lang.Object
| Constructor and Description | 
|---|
| Interface_Client() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected java.lang.String | executeGet(java.lang.String urlStr,
          java.util.Map<java.lang.String,java.lang.String> paramsMap)Executes a rerouted HTTP GET request as a POST on the specified URL | 
| protected java.lang.String | executePost(java.lang.String urlStr,
           java.util.Map<java.lang.String,java.lang.String> paramsMap)Executes a HTTP POST request on the url specified. | 
| protected java.lang.String | getReply(java.io.InputStream is)Receives a reply from a HTTP submission | 
| protected java.net.HttpURLConnection | initPostConnection(java.lang.String urlStr)Initialises a HTTP POST connection | 
| protected java.util.Map<java.lang.String,java.lang.String> | prepareParamMap(java.lang.String action,
               java.lang.String handle)Initialises a map for transporting parameters - used by extending classes | 
| protected java.lang.String | send(java.net.HttpURLConnection connection,
    java.util.Map<java.lang.String,java.lang.String> paramsMap,
    boolean stripOuterXML)Sends data to the specified url via a HTTP POST, and returns the reply | 
| protected void | setReadTimeout(int timeout)Set the read timeout value for future connections | 
| protected java.lang.String | stripOuterElement(java.lang.String xml)Removes the outermost set of xml tags from a string, if any | 
| boolean | successful(java.lang.String message)Tests a response message for success or failure | 
protected java.lang.String executePost(java.lang.String urlStr,
                                       java.util.Map<java.lang.String,java.lang.String> paramsMap)
                                throws java.io.IOException
urlStr - the URL to send the POST toparamsMap - a set of attribute-value pairs that make up the posted datajava.io.IOException - when there's some kind of communication problemprotected java.lang.String executeGet(java.lang.String urlStr,
                                      java.util.Map<java.lang.String,java.lang.String> paramsMap)
                               throws java.io.IOException
urlStr - the URL to send the GET toparamsMap - a set of attribute-value pairs that make up the posted datajava.io.IOException - when there's some kind of communication problemprotected java.util.Map<java.lang.String,java.lang.String> prepareParamMap(java.lang.String action,
                                                                           java.lang.String handle)
action - the name of the action to takehandle - the current engine session handleprotected void setReadTimeout(int timeout)
timeout - the timeout value in milliseconds. A value of -1 (the default)
                means a read will wait indefinitely.protected java.lang.String stripOuterElement(java.lang.String xml)
xml - the xml string to stripprotected java.lang.String send(java.net.HttpURLConnection connection,
                                java.util.Map<java.lang.String,java.lang.String> paramsMap,
                                boolean stripOuterXML)
                         throws java.io.IOException
connection - the http url connection to send the request toparamsMap - a map of attribute=value pairs representing the data to sendstripOuterXML - true if this was originally a POST request, false if a GET requestjava.io.IOException - when there's some kind of communication problemprotected java.net.HttpURLConnection initPostConnection(java.lang.String urlStr)
                                                 throws java.io.IOException
urlStr - the url to connect tojava.io.IOException - when there's some kind of communication problempublic boolean successful(java.lang.String message)
message - the response message to testprotected java.lang.String getReply(java.io.InputStream is)
                             throws java.io.IOException
is - the InputStream of a URL or Connection objectjava.io.IOException - when there's some kind of communication problemCopyright © 2004-2014 The YAWL Foundation.