org.cruxframework.crux.core.server.rest.state
Interface ResourceStateHandler

All Known Implementing Classes:
ClusteredResourceStateHandler, NoClusteredResourceStateHandler

public interface ResourceStateHandler

Control the etags, dateModified and expires of rest services that can be cached.

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
static interface ResourceStateHandler.ResourceState
          Contains state information about a given rest URI
 
Method Summary
 ResourceStateHandler.ResourceState add(String uri, long dateModified, long expires, String etag)
          Add state information about one rest URI
 void clear()
          Clear all state information from rest URIs
 ResourceStateHandler.ResourceState get(String uri)
          Retrieve state information about one rest URI
 void remove(String uri)
          Clear the state information about one rest URI
 void removeSegments(String... baseURIs)
          Clear the state information about any rest URI that starts with one of the baseURIs provided
 

Method Detail

add

ResourceStateHandler.ResourceState add(String uri,
                                       long dateModified,
                                       long expires,
                                       String etag)
Add state information about one rest URI

Parameters:
uri -
dateModified -
expires -
etag -
Returns:

get

ResourceStateHandler.ResourceState get(String uri)
Retrieve state information about one rest URI

Parameters:
uri -
Returns:

remove

void remove(String uri)
Clear the state information about one rest URI

Parameters:
uri -

removeSegments

void removeSegments(String... baseURIs)
Clear the state information about any rest URI that starts with one of the baseURIs provided

Parameters:
baseURIs -

clear

void clear()
Clear all state information from rest URIs



Copyright © 2014. All rights reserved.