| java.lang.Object org.wings.externalizer.AbstractExternalizeManager
All known Subclasses: org.wings.externalizer.ExternalizeManager, org.wings.externalizer.SystemExternalizeManager,
AbstractExternalizeManager | abstract public class AbstractExternalizeManager (Code) | | author: Armin Haaf |
Field Summary | |
final public static int | FINAL for an externalized object with the final flag on the expired date
header is set to a big value. | final public long | FINAL_EXPIRES in seconds; Computed from UNIQUE_TIMESLICE; do not change. | final public static int | GLOBAL for an externalized object with the gobal flag on, the externalized
object is available to all requests. | final protected static Log | LOG | final public static String | NOT_FOUND_IDENTIFIER The identifier generated, if the
ExternalizeManager did not find
an apropriate
Externalizer . | final protected long | PREFIX_TIMESLICE Prefix for the externalized ID; long. | final public static int | REQUEST for an externalized object with the request flag on, the externalized
object is removed from the
ExternalizeManager after one request
of the object. | final public static int | SESSION for an externalized object with the session flag on, the externalized
object only available to requests within the session which created the
object. | final public int | UNIQUE_TIMESLICE | final protected Map<ExternalizedResource, String> | reverseExternalized To search for an already externalized object. | protected String | sessionEncoding To support Session local externalizing, the
ExternalizeManager needs to encode the session identifier of the servlet container in the
URL of the externalized object. |
Method Summary | |
public void | clear() | final protected String | createIdentifier() | public void | deliver(String identifier, HttpServletResponse response, Device out) delivers a externalized object identfied with the given identifier to a
client. | public void | deliver(ExternalizedResource extInfo, HttpServletResponse response, Device out) | public String | externalize(Object obj, Externalizer externalizer) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(Object obj, Externalizer externalizer, Collection headers) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(Object obj, Externalizer externalizer, int flags) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(Object obj, Externalizer externalizer, Collection headers, int flags) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(Object obj, Externalizer externalizer, String mimeType) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(Object obj, Externalizer externalizer, String mimeType, Collection headers) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(Object obj, Externalizer externalizer, String mimeType, Collection headers, int flags) externalizes (make a java object available for a browser) an object with
the given
Externalizer . | public String | externalize(ExternalizedResource extInfo) externalizes (make a java object available for a browser) the object in
extInfo. | abstract public ExternalizedResource | getExternalizedResource(String identifier) get the
ExternalizedResource by identifier. | public String | getId(String url) externalizes (make a java object available for a browser) the object in
extInfo. | final protected synchronized long | getNextIdentifier() | public String | getPrefix() | abstract public void | removeExternalizedResource(String identifier) removes the
ExternalizedResource by identifier. | public void | setPrefix(String prefix) | public void | setResponse(HttpServletResponse response) | abstract protected void | storeExternalizedResource(String identifier, ExternalizedResource extInfo) store the
ExternalizedResource in a map. |
FINAL | final public static int FINAL(Code) | | for an externalized object with the final flag on the expired date
header is set to a big value. If the final flag is off, the browser
or proxy does not cache the object.
|
FINAL_EXPIRES | final public long FINAL_EXPIRES(Code) | | in seconds; Computed from UNIQUE_TIMESLICE; do not change.
|
GLOBAL | final public static int GLOBAL(Code) | | for an externalized object with the gobal flag on, the externalized
object is available to all requests. Also it is never garbage collected
and available for the lifecycle of the servlet container.
|
LOG | final protected static Log LOG(Code) | | |
PREFIX_TIMESLICE | final protected long PREFIX_TIMESLICE(Code) | | Prefix for the externalized ID; long. Computed, do not change.
|
REQUEST | final public static int REQUEST(Code) | | for an externalized object with the request flag on, the externalized
object is removed from the
ExternalizeManager after one request
of the object.
|
SESSION | final public static int SESSION(Code) | | for an externalized object with the session flag on, the externalized
object only available to requests within the session which created the
object. The object is not accessible anymore after the session is
destroyed (it is garbage collected after the session is garbage
collected)
|
UNIQUE_TIMESLICE | final public int UNIQUE_TIMESLICE(Code) | | in seconds
|
sessionEncoding | protected String sessionEncoding(Code) | | To support Session local externalizing, the
ExternalizeManager needs to encode the session identifier of the servlet container in the
URL of the externalized object. This is set in the constructor
and should work (I hope so) with all servlet containers.
|
AbstractExternalizeManager | public AbstractExternalizeManager()(Code) | | |
clear | public void clear()(Code) | | |
createIdentifier | final protected String createIdentifier()(Code) | | |
deliver | public void deliver(String identifier, HttpServletResponse response, Device out) throws IOException(Code) | | delivers a externalized object identfied with the given identifier to a
client.
It sends an error (404), if the identifier is not registered.
|
externalize | public String externalize(Object obj, Externalizer externalizer, int flags)(Code) | | externalizes (make a java object available for a browser) an object with
the given
Externalizer . Valid flags are (this may change, look
also in the static variable section)
a URL for accessing the object relative to the base URL. |
externalize | public String externalize(Object obj, Externalizer externalizer, Collection headers, int flags)(Code) | | externalizes (make a java object available for a browser) an object with
the given
Externalizer . If the given headers are !=null the
headers overwrite the headers from the
Externalizer .
Valid flags are (this may change, look
also in the static variable section)
a URL for accessing the object relative to the base URL. |
externalize | public String externalize(Object obj, Externalizer externalizer, String mimeType, Collection headers)(Code) | | externalizes (make a java object available for a browser) an object with
the given
Externalizer .
If the mimeType!=null, mimeType overwrites the mimeType of the
Externalizer .
If the given headers are !=null the
headers overwrite the headers from the
Externalizer .
a URL for accessing the object relative to the base URL. |
externalize | public String externalize(Object obj, Externalizer externalizer, String mimeType, Collection headers, int flags)(Code) | | externalizes (make a java object available for a browser) an object with
the given
Externalizer .
If the mimeType!=null, mimeType overwrites the mimeType of the
Externalizer .
If the given headers are !=null the
headers overwrite the headers from the
Externalizer .
Valid flags are (this may change, look
also in the static variable section)
a URL for accessing the object relative to the base URL. |
externalize | public String externalize(ExternalizedResource extInfo)(Code) | | externalizes (make a java object available for a browser) the object in
extInfo.
a URL for accessing the externalized object relative to the base URL. |
getId | public String getId(String url)(Code) | | externalizes (make a java object available for a browser) the object in
extInfo.
a URL for accessing the externalized object relative to the base URL. |
getNextIdentifier | final protected synchronized long getNextIdentifier()(Code) | | |
|
|