|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.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. |
DomRepresentation |
getEntityAsDom()
Returns the entity as a DOM representation. This method can be called several times and will always return the same representation instance. |
Form |
getEntityAsForm()
Returns the entity as a form. This method can be called several times and will always return the same form instance. |
java.lang.Object |
getEntityAsObject()
Deprecated. Since 1.1, the ConverterService is deprecated, with no replacement as it doesn't fit well with content negotiation. Most users prefer to handle those conversion in Resource subclasses. |
SaxRepresentation |
getEntityAsSax()
Returns the entity as a SAX representation. This method can be called several times and will always return the same representation instance. |
abstract boolean |
isConfidential()
Indicates if the message was or will be exchanged confidentially, for example via a SSL-secured connection. |
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(java.lang.Object object)
Deprecated. Since 1.1, the ConverterService is deprecated, with no replacement as it doesn't fit well with content negotiation. Most users prefer to handle those conversion in Resource subclasses. |
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 DomRepresentation getEntityAsDom()
public Form getEntityAsForm()
@Deprecated public java.lang.Object getEntityAsObject()
ConverterService
public SaxRepresentation getEntityAsSax()
public abstract boolean isConfidential()
public boolean isEntityAvailable()
public void release()
public void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
attributes
- The modifiable map of attributes@Deprecated public void setEntity(java.lang.Object object)
object
- The higher-level object.ConverterService
public 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 |