|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.client.representation.Variant
org.restlet.client.representation.RepresentationInfo
org.restlet.client.representation.Representation
org.restlet.client.representation.CharacterRepresentation
org.restlet.client.representation.StringRepresentation
org.restlet.client.representation.ObjectRepresentation<T>
T
- The class to serialize.public class ObjectRepresentation<T>
Representation based on a serializable Java object. This internally reuses the GWT-RPC serialization logic.
Field Summary |
---|
Fields inherited from class org.restlet.client.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
ObjectRepresentation(ClientProxy resource,
T object)
Constructor for serialization. |
|
ObjectRepresentation(RemoteService remoteService,
T object)
Constructor for serialization. |
|
ObjectRepresentation(SerializationStreamFactory serializationStreamFactory,
T object)
Constructor for serialization. |
|
ObjectRepresentation(String serializedObject,
ClientProxy resource)
Constructor for deserialization. |
|
ObjectRepresentation(String serializedObject,
RemoteService remoteService)
Constructor for deserialization. |
|
ObjectRepresentation(String serializedObject,
SerializationStreamFactory serializationStreamFactory)
Constructor for deserialization. |
|
ObjectRepresentation(String serializedObject,
SerializationStreamFactory serializationStreamFactory,
boolean string)
Constructor for deserialization. |
Method Summary | |
---|---|
T |
getObject()
The wrapped object. |
SerializationStreamFactory |
getSerializationStreamFactory()
Returns the serialization stream factory. |
String |
getText()
Converts the representation to a string value. |
boolean |
isString()
Indicates if the serialized object is a String. |
void |
setObject(T object)
Sets the wrapped object. |
void |
setSerializationStreamFactory(SerializationStreamFactory serializationStreamFactory)
Sets the serialization stream factory. |
void |
setString(boolean string)
Indicates if the serialized object is a String. |
Methods inherited from class org.restlet.client.representation.StringRepresentation |
---|
getReader, getStream, release, setCharacterSet, setText, setText, updateSize |
Methods inherited from class org.restlet.client.representation.Representation |
---|
createEmpty, exhaust, getAvailableSize, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, isAvailable, isDownloadable, isTransient, setAvailable, setDisposition, setDownloadable, setDownloadName, setExpirationDate, setRange, setSize, setTransient |
Methods inherited from class org.restlet.client.representation.RepresentationInfo |
---|
getModificationDate, getTag, setModificationDate, setTag |
Methods inherited from class org.restlet.client.representation.Variant |
---|
createClientInfo, equals, getCharacterSet, getEncodings, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectRepresentation(ClientProxy resource, T object)
resource
- The remote resource from which to obtain the serialization
stream factory.object
- The object to serialize.public ObjectRepresentation(RemoteService remoteService, T object)
remoteService
- The remote service from which to obtain the serialization
stream factory.object
- The object to serialize.public ObjectRepresentation(SerializationStreamFactory serializationStreamFactory, T object)
serializationStreamFactory
- The serialization stream factory.object
- The object to serialize.public ObjectRepresentation(String serializedObject, ClientProxy resource)
serializedObject
- The object serialization text.resource
- The remote resource from which to obtain the serialization
stream factory.public ObjectRepresentation(String serializedObject, RemoteService remoteService)
serializedObject
- The object serialization text.remoteService
- The remote service from which to obtain the serialization
stream factory.public ObjectRepresentation(String serializedObject, SerializationStreamFactory serializationStreamFactory)
serializedObject
- The object serialization text.serializationStreamFactory
- The serialization stream factory.public ObjectRepresentation(String serializedObject, SerializationStreamFactory serializationStreamFactory, boolean string)
serializedObject
- The object serialization text.serializationStreamFactory
- The serialization stream factory.Method Detail |
---|
public T getObject()
public SerializationStreamFactory getSerializationStreamFactory()
public String getText()
Representation
getText
in class StringRepresentation
public boolean isString()
public void setObject(T object)
object
- The wrapped object.public void setSerializationStreamFactory(SerializationStreamFactory serializationStreamFactory)
serializationStreamFactory
- The serialization stream factory.public void setString(boolean string)
string
- True if the serialized object is a String.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |