|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.www.protocol.http.cache.CacheFilter org.w3c.www.protocol.http.cache.push.PushCacheFilter
public class PushCacheFilter
PushCacheFilter Based heavily on (much code stolen from) CacheFilter The important differences are in the initialization where the PushCacheListener is started, and in ingoingFilter where if the requested resource is present in the cache and is a PUSH resource, then the resource is returned immediately without checking for expiry etc. This allows us to insert pages from "virtual" web sites such as http://www.push.data/sensor1.html
Field Summary | |
---|---|
static int |
DEFAULT_PORT_NUM
Default port number to use if property value is not supplied value is 9876 |
static java.lang.String |
PORT_NUM_P
Property name used to acquire port number for PushCacheListener
value is "org.w3c.www.protocol.http.cache.push.portnumber"; |
Fields inherited from class org.w3c.www.protocol.http.cache.CacheFilter |
---|
CACHE_CONNECTED_P, CACHE_SIZE_P, connected, debug, DEBUG_P, directory, precache, props, serializer, SERIALIZER_P, shared, SHARED_P, size, STATE_NOCACHE, STATE_ORIGREQ, STATE_REVALIDATION, STATE_WARNINGS, store, sweeper, SWEEPER_P, uritable, validator, VALIDATOR_P, WARN_DISCONNECTED, WARN_HEURISTIC, WARN_STALE |
Constructor Summary | |
---|---|
PushCacheFilter()
|
Method Summary | |
---|---|
boolean |
canUseCache(Request req)
check if we can use the cache or not for this request It marks the request as being not cachable if false. |
org.w3c.www.protocol.http.cache.push.PushCacheStore |
getPushCacheStore()
Access to PushCacheStore |
Reply |
ingoingFilter(Request request)
The request pre-processing hook. |
void |
initialize(HttpManager manager)
Almost identical to CacheFilter.initialize, but creates a PushCacheStore instead of a CacheStore and additionaly starts the PushCacheListener |
Methods inherited from class org.w3c.www.protocol.http.cache.CacheFilter |
---|
addWarning, canCache, canStore, cleanUpload, exceptionFilter, getSerializer, getStore, getSweeper, getValidator, isConnected, isShared, outgoingFilter, propertyChanged, pushDocument, setRequestRevalidation, setWarnings, sync, trace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PORT_NUM_P
PushCacheListener
value is "org.w3c.www.protocol.http.cache.push.portnumber";
public static final int DEFAULT_PORT_NUM
Constructor Detail |
---|
public PushCacheFilter()
Method Detail |
---|
public org.w3c.www.protocol.http.cache.push.PushCacheStore getPushCacheStore()
public boolean canUseCache(Request req)
canUseCache
in class CacheFilter
a
- request, the incoming client-side request
public Reply ingoingFilter(Request request) throws HttpException
ingoingFilter
in interface RequestFilter
ingoingFilter
in class CacheFilter
request
- The request that is about to be launched.
HttpException
- If the filter is supposed to fulfill the
request, but some error happened during that processing.public void initialize(HttpManager manager) throws PropRequestFilterException
initialize
in interface PropRequestFilter
initialize
in class CacheFilter
manager
- The HttpManager initializing the filter.
PropRequestFilterException
- If the filter couldn't be
initialized properly.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |