public class ProxyCacheResource extends ResourceBase implements CacheResource
Resource.ResourceTreeBuilderLOGGER| 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) |
void |
handleGET(CoapExchange exchange) |
void |
handlePOST(CoapExchange exchange) |
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, notifyObserverRelations, 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)
handleDELETE in class ResourceBasepublic void handleGET(CoapExchange exchange)
handleGET in class ResourceBasepublic void handlePOST(CoapExchange exchange)
handlePOST in class ResourceBasepublic boolean isEnabled()
public void setEnabled(boolean enabled)
Copyright © 2014 Institute for Pervasive Computing, ETH Zurich. All rights reserved.