|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Externalizer<SUPPORTED_TYPE>
The ExternalizeManager uses a Externalizer to deliver an
external representation of a java object to the output device (usually
an HTTP connection).
A SFrame'es external representation would be HTML, an Images content the
GIF-byte stream, for instance.
An Externalizer must be
registered at the
ExternalizeManager of the current
Session to work seamlessly.
| Method Summary | |
|---|---|
String |
getExtension(SUPPORTED_TYPE obj)
Returns the file extension of the given object. |
Collection<HttpHeader> |
getHeaders(SUPPORTED_TYPE obj)
Get additional http-headers. |
String |
getId(SUPPORTED_TYPE obj)
Suggest an id. |
int |
getLength(SUPPORTED_TYPE obj)
Returns the externalized length of this Object. |
String |
getMimeType(SUPPORTED_TYPE obj)
returns the mime type of the given object. |
Class[] |
getSupportedClasses()
Returns the supported classes. |
String[] |
getSupportedMimeTypes()
Returns the supported mime types. |
boolean |
isFinal(SUPPORTED_TYPE obj)
Returns true if the object is final, false if transient. |
void |
write(Object obj,
Device out)
Writes the given object into the given Device. |
| Method Detail |
|---|
String getId(SUPPORTED_TYPE obj)
String getExtension(SUPPORTED_TYPE obj)
String getMimeType(SUPPORTED_TYPE obj)
int getLength(SUPPORTED_TYPE obj)
boolean isFinal(SUPPORTED_TYPE obj)
void write(Object obj,
Device out)
throws IOException,
ResourceNotFoundException
ResourceNotFoundException - if the underlying resource is not available.
IOExceptionClass[] getSupportedClasses()
ExternalizeManager
chooses the Externalizer (if not specified as parameter) by objects
class.
String[] getSupportedMimeTypes()
ExternalizeManager
chooses the Externalizer by mime type (if specified as parameter)
Collection<HttpHeader> getHeaders(SUPPORTED_TYPE obj)
obj - get headers for this object
Map.Entry (key-value pairs) or null if none should be added.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||