public abstract class AbstractRestCacheHandler extends AbstractCacheHandler
AbstractRestOperation
. All
references to IOperation
s can safely be cast to
AbstractRestOperation
.Constructor and Description |
---|
AbstractRestCacheHandler() |
AbstractRestCacheHandler(java.lang.String mimeType,
java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
afterOperationExecution(IOperation operation)
Is invoked after the operation itself is started with
IOperation#internalExecute() . |
ICacheManager |
getCacheManager() |
void |
onOperationFinished(IOperation operation)
Notifies this listener that the watched
IOperation finished. |
setCacheManager
beforeOperationExecution, onOperationSuccessful, skipOperationExecution
onOperationFailed
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onOperationFailed
public AbstractRestCacheHandler()
public AbstractRestCacheHandler(java.lang.String mimeType, java.lang.String encoding)
public ICacheManager getCacheManager()
getCacheManager
in class AbstractCacheHandler
public void afterOperationExecution(IOperation operation)
IOperationCacheHandler
IOperation#internalExecute()
. Can be used to read data from the
operation and write it into the cache.afterOperationExecution
in interface IOperationCacheHandler
afterOperationExecution
in class NoCacheHandler
public void onOperationFinished(IOperation operation)
IOperationDelegate
IOperation
finished. IOperation#getResultCode()
to validate the success of the
operation. E.g. for a remote operation:
switch (operation.getResponse().getStatusCode()) { caseHttpConnection.HTTP_OK
: break; caseHttpConnection.HTTP_FORBIDDEN
: break; }
onOperationFinished
in interface IOperationDelegate
onOperationFinished
in class AbstractOperationDelegate
operation
- The watched IOperation
.