|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.httpgw.HTTPRequest
public abstract class HTTPRequest
This class is a carrier of HTTP request information to a Windchill method server. It uses customized serialization code to stream request bodies to the server. Instances contain information about the request (I.e. CGI environment values) and an input stream reference.
Client-side Serialization The client (HTTP gateway) constructs request objects to carry request information to a method server. The client stores the available HTTP request information in the object and sets the input stream reference to the actual HTTP request's input stream provided by the Web server.
Serialization of the object sends the request information followed by the content of the input stream. The content is forwarded by reading blocks of data from the input stream and writing them to the marshal stream until the entire body has been sent. The length of the body is determined from the content-length HTTP header. If no content-length is specified, it reads until EOF on the input stream.
Server-side Deserialization
The server (Windchill method server) receives the request object as
an argument to an RMI call. It is deserialized before the target
method is invoked. The deserialization code stores a reference to
the RMI marshal stream in the object and directly dispatches the target
method (HTTPServer.processRequest) prematurely. The body of the request
is then available as an input stream to the dispatched method. The
RMI marshal stream is simply being used as a pipe to connect the
input stream provided to the HTTP gateway by the Web server to an
input stream in the Windchill method server.
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
abstract String |
getBaseURL()
Determine the Base URL of this script. |
abstract String |
getEncoding()
Guess user agent's file encoding from request headers. |
abstract Properties |
getFormData()
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
abstract Properties |
getFormData(String encoding)
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
abstract Hashtable |
getFormDataMultivalue()
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
abstract Hashtable |
getFormDataMultivalue(String encoding)
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
abstract String |
getFullURL()
Determine the Full URL of this script. |
abstract String |
getMultiPartBoundary(String ContentType)
Utility routine to parse out the multipart object-body boundary Supported API: true |
abstract String |
getProperty(String key)
Public getter method for access to CGI data. |
abstract String |
getProperty(String key,
String default_value)
Public getter method for access to CGI data. |
abstract Enumeration |
getPropertyKeys()
Public getter method for access to CGI data keys. |
abstract String |
getQueryString()
Gets the URLs query string in decoded format. |
abstract String |
getQueryString(String encoding)
Gets the URLs query string in decoded format. |
abstract boolean |
isGetRequest()
Determine if the REQUEST_METHOD used to send the data from the browser was the GET method. |
abstract boolean |
isPostRequest()
Determine if the REQUEST_METHOD used to send the data from the browser was the POST method. |
abstract boolean |
isUrlencodedContent()
Determine if the CONTENT_TYPE used to send the data from the browser was urlencoded form data. |
abstract PrintWriter |
newPrintWriter(OutputStream output_stream)
Utility routine to construct a buffered PrintWriter from an OutputStream. |
abstract void |
setFormData(Properties p)
Sets the FORM data from a saved session. |
abstract void |
setProperty(String key,
String value)
Public setter method for CGI data. |
abstract Properties |
splitQueryString()
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
static Properties |
splitQueryString(String query_string)
Splits the given query string into name value pairs based on the ampersand and equal character tokens. |
static Properties |
splitQueryString(String query_string,
String encoding)
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
abstract Hashtable |
splitQueryStringMultivalue()
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
static Hashtable |
splitQueryStringMultivalue(String query_string)
Splits the given query string into name value pairs based on the ampersand and equal character tokens. |
static Hashtable |
splitQueryStringMultivalue(String query_string,
String encoding)
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public abstract Properties getFormData()
getEncoding.
public abstract void setFormData(Properties p)
public abstract Properties getFormData(String encoding)
public abstract Hashtable getFormDataMultivalue()
getEncoding. Multivalue fields are stored in a Vector which can be
iterated for the individual values.
public abstract Hashtable getFormDataMultivalue(String encoding)
public abstract String getQueryString()
public abstract String getQueryString(String encoding)
public abstract Properties splitQueryString()
public abstract Hashtable splitQueryStringMultivalue()
public static Properties splitQueryString(String query_string)
query_string - the query string.
public static Hashtable splitQueryStringMultivalue(String query_string)
query_string - the query string.
public static Properties splitQueryString(String query_string,
String encoding)
query_string - the query string.encoding - the character encoding name
public static Hashtable splitQueryStringMultivalue(String query_string,
String encoding)
query_string - the query string.encoding - the character encoding name
public abstract boolean isGetRequest()
public abstract boolean isPostRequest()
public abstract boolean isUrlencodedContent()
public abstract String getBaseURL()
public abstract String getFullURL()
public abstract String getProperty(String key)
String - the key of interest
public abstract Enumeration getPropertyKeys()
public abstract String getProperty(String key,
String default_value)
String - the key of interestString - the default value to return
public abstract void setProperty(String key,
String value)
String - the key of interestString - the valuepublic abstract String getEncoding()
wt.httpgw.encoding.xxx=yyy where xxx is
the lower case IANA encoding name and yyy is the
Java encoding name. If no Accept-Charset header is present,
use template encoding rules to guess.
public abstract PrintWriter newPrintWriter(OutputStream output_stream)
output_stream - OutputStream to be wrapped
public abstract String getMultiPartBoundary(String ContentType)
ContentType - String containing the content-type and boundary,
separated by a semi-colon
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||