public class ProxyCacheResource extends CoapResource implements CacheResource
Resource.ResourceTreeBuilder| Constructor and Description | 
|---|
ProxyCacheResource()
Instantiates a new proxy cache resource. 
 | 
ProxyCacheResource(boolean enabled)
Instantiates a new proxy cache resource. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
cacheResponse(Request request,
             Response response)
Puts in cache an entry or, if already present, refreshes it. 
 | 
com.google.common.cache.CacheStats | 
getCacheStats()  | 
Response | 
getResponse(Request request)
Retrieves the response in the cache that matches the request passed, null
 otherwise. 
 | 
void | 
handleDELETE(CoapExchange exchange)
Handles the DELETE request in the given CoAPExchange. 
 | 
void | 
handleGET(CoapExchange exchange)
Handles the GET request in the given CoAPExchange. 
 | 
void | 
handlePOST(CoapExchange exchange)
Handles the POST request in the given CoAPExchange. 
 | 
void | 
invalidateRequest(Request request)  | 
boolean | 
isEnabled()  | 
void | 
setEnabled(boolean enabled)  | 
add, add, add, addObserver, addObserveRelation, changed, checkObserveRelation, clearAndNotifyObserveRelations, clearObserveRelations, createClient, createClient, createClient, delete, execute, executeAndWait, getAttributes, getChild, getChildren, getEndpoints, getExecutor, getName, getObserverCount, getParent, getPath, getURI, handlePUT, handleRequest, isCachable, isObservable, isVisible, remove, remove, removeObserver, removeObserveRelation, setName, setObservable, setObserveType, setParent, setPath, setVisiblepublic ProxyCacheResource()
public ProxyCacheResource(boolean enabled)
public void cacheResponse(Request request, Response response)
cacheResponse in interface CacheResourcepublic com.google.common.cache.CacheStats getCacheStats()
getCacheStats in interface CacheResourcepublic Response getResponse(Request request)
getResponse in interface CacheResourcerequest - the requestpublic void invalidateRequest(Request request)
invalidateRequest in interface CacheResourcepublic void handleDELETE(CoapExchange exchange)
CoapResourcehandleDELETE in class CoapResourceexchange - the CoapExchange for the simple APIpublic void handleGET(CoapExchange exchange)
CoapResourcehandleGET in class CoapResourceexchange - the CoapExchange for the simple APIpublic void handlePOST(CoapExchange exchange)
CoapResourcehandlePOST in class CoapResourceexchange - the CoapExchange for the simple APIpublic boolean isEnabled()
public void setEnabled(boolean enabled)