|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resource
This is the interface for resources which can be deployed by a given communication manager.
Every implementation of this interface should return correct values for content type and size.
If it is not possible to determinate the content type of the resource, the
getContentType()
method should return at least the
application/octet-stream content type.
Method Summary | |
---|---|
InternetMediaType |
getContentType()
Returns the content type of this resource. |
HashMap |
getHeaderFields()
Returns additional header fields for this resource. |
long |
getLastModifiedDate()
Returns the last time where this resource was modified as UNIX timestamp. |
void |
serialize(URI request,
RequestHeader requestHeader,
java.io.InputStream requestBody,
java.io.OutputStream out)
Serializes this resource to the given output stream out . |
java.lang.String |
shortDescription()
A short string representation of this resource. |
long |
size()
The size of the resource. |
Method Detail |
---|
InternetMediaType getContentType()
If it is not possible to determinate the content type of the resource,
the getContentType()
method should return at least the
application/octet-stream content type.
void serialize(URI request, RequestHeader requestHeader, java.io.InputStream requestBody, java.io.OutputStream out) throws java.io.IOException
out
.
request
- the request URIrequestHeader
- the header of the requestrequestBody
- makes the content of the request body availableout
- the outputs stream to serialize this resource over
java.io.IOException
- if an IO failure occurs during serializationHashMap getHeaderFields()
The additional header fields allow to add header fields to the response which will be created to send this resource.
NOTICE: The map must contain a String
,
String
mapping.
long size()
If it is not possible to determinate the size of the resource. The
implementation should return -1
. This will allow to send the
resource as chunked content.
long getLastModifiedDate()
java.lang.String shortDescription()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |