Package wt.httpgw

Class HTTPRequestImpl

java.lang.Object
wt.httpgw.HTTPRequest
wt.httpgw.HTTPRequestImpl
All Implemented Interfaces:
Externalizable, Serializable, CGIConstants

public final class HTTPRequestImpl extends HTTPRequest implements Externalizable
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

See Also: