|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.gwt.data.Message
public abstract class Message
Generic message exchanged between client and server connectors.
Constructor Summary | |
---|---|
Message()
Constructor. |
|
Message(Representation entity)
Constructor. |
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns the modifiable map of attributes that can be used by developers to save information relative to the message. |
Representation |
getEntity()
Returns the entity representation. |
Form |
getEntityAsForm()
Returns the entity as a form. This method can be called several times and will always return the same form instance. |
JsonRepresentation |
getEntityAsJson()
Returns the entity as a JSON representation. This method can be called several times and will always return the same representation instance. |
XmlRepresentation |
getEntityAsXml()
Returns the entity as a XML DOM representation. This method can be called several times and will always return the same representation instance. |
boolean |
isEntityAvailable()
Indicates if a content is available and can be sent. |
void |
release()
Releases the message's entity. |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Sets the modifiable map of attributes |
void |
setEntity(Representation entity)
Sets the entity representation. |
void |
setEntity(java.lang.String value,
MediaType mediaType)
Sets a textual entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Message()
public Message(Representation entity)
entity
- The payload of the message.Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Attribute name | Class name | Description |
---|---|---|
org.restlet.http.headers | org.restlet.data.Form | Server HTTP connectors must provide all request headers and client HTTP connectors must provide all response headers, exactly as they were received. In addition, developers can also use this attribute to specify non-standard headers that should be added to the request or to the response. |
org.restlet.https.clientCertificates | List |
For requests received via a secure connector, indicates the ordered list of client certificates, if they are available and accessible. |
public Representation getEntity()
public Form getEntityAsForm()
public JsonRepresentation getEntityAsJson()
public XmlRepresentation getEntityAsXml()
public boolean isEntityAvailable()
public void release()
public void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
attributes
- The modifiable map of attributespublic void setEntity(Representation entity)
entity
- The entity representation.public void setEntity(java.lang.String value, MediaType mediaType)
value
- The represented string.mediaType
- The representation's media type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |