|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.appserver.server.httpPresentation.HttpSerialized
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.
Serializable
Field Summary | |
static java.lang.String |
serializedMimeType
The mime type used to send and recieve Java serialized objects. |
Constructor Summary | |
HttpSerialized()
|
Method Summary | |
static java.lang.Object |
readSerializedObject(HttpPresentationComms comms)
Read in a Java object from a POST request. |
static java.lang.Object |
readSerializedObject(HttpPresentationRequest request)
Read in a Java object from a POST request. |
static void |
writeSerializedObject(HttpPresentationComms comms,
java.io.Serializable object)
Return a serialized Java object to the client. |
static void |
writeSerializedObject(HttpPresentationResponse response,
java.io.Serializable object)
Return a serialized Java object to the client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String serializedMimeType
Constructor Detail |
public HttpSerialized()
Method Detail |
public static java.lang.Object readSerializedObject(HttpPresentationRequest request) throws HttpPresentationException
request
- HTTP communication request.
HttpPresentationException
- If the request is not of type POST, or the content type is not
correct, or there is an IO or serialization error.public static java.lang.Object readSerializedObject(HttpPresentationComms comms) throws HttpPresentationException
comms
- HTTP communications object. Contains objects and interfaces to read
the request and send a response.
HttpPresentationException
- If the request is not of type POST, or the content type is not
correct, or there is an IO or serialization error.public static void writeSerializedObject(HttpPresentationResponse response, java.io.Serializable object) throws HttpPresentationException
object
- The object to return to the client.
HttpPresentationException
- If there is an error serializing the object, or an error in the
underlying calls to response.public static void writeSerializedObject(HttpPresentationComms comms, java.io.Serializable object) throws HttpPresentationException
comms
- HTTP communications object. Contains objects and interfaces to read
the request and send a response.object
- The object to return to the client.
HttpPresentationException
- If there is an error serializing the object, or an error in the
underlying calls to response.
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |