| java.lang.Object com.lutris.appserver.server.httpPresentation.HttpSerialized
HttpSerialized | public class HttpSerialized (Code) | | This class provides two utility methods for presentation objects
that want to read and/or write Java serialized objects.
Reading is accomplished by having the client issue a POST request,
with the serialized data as the body of the request.
Writing is accomplished by simply sending out the serialized bytes.
See Also: java.io.Serializable |
Field Summary | |
final public static String | serializedMimeType The mime type used to send and recieve Java serialized objects. |
serializedMimeType | final public static String serializedMimeType(Code) | | The mime type used to send and recieve Java serialized objects.
|
readSerializedObject | public static Object readSerializedObject(HttpPresentationRequest request) throws HttpPresentationException(Code) | | Read in a Java object from a POST request. The object is returned.
Parameters: request - HTTP communication request. The java object sent in the POST request. exception: HttpPresentationException - If the request is not of type POST, or the content type is notcorrect, or there is an IO or serialization error. |
readSerializedObject | public static Object readSerializedObject(HttpPresentationComms comms) throws HttpPresentationException(Code) | | Read in a Java object from a POST request. The object is returned.
Parameters: comms - HTTP communications object. Contains objects and interfaces to readthe request and send a response. The java object sent in the POST request. exception: HttpPresentationException - If the request is not of type POST, or the content type is notcorrect, or there is an IO or serialization error. |
writeSerializedObject | public static void writeSerializedObject(HttpPresentationResponse response, Serializable object) throws HttpPresentationException(Code) | | Return a serialized Java object to the client.
Parameters: comms - HTTP Response object. interface to send a response. Parameters: object - The object to return to the client. exception: HttpPresentationException - If there is an error serializing the object, or an error in theunderlying calls to response. |
writeSerializedObject | public static void writeSerializedObject(HttpPresentationComms comms, Serializable object) throws HttpPresentationException(Code) | | Return a serialized Java object to the client.
Parameters: comms - HTTP communications object. Contains objects and interfaces to readthe request and send a response. Parameters: object - The object to return to the client. exception: HttpPresentationException - If there is an error serializing the object, or an error in theunderlying calls to response. |
|
|