Package org.cruxframework.crux.core.server.rest.core.dispatch

Examples of org.cruxframework.crux.core.server.rest.core.dispatch.CacheInfo


  private boolean ensureReaderMethod(List<RestMethodRegistrationInfo> methods)
    {
    for (RestMethodRegistrationInfo methodInfo : methods)
        {
      CacheInfo cacheInfo = HttpMethodHelper.getCacheInfoForGET(methodInfo.invoker.getMethod());
      if (cacheInfo != null)
      {
        if (!cacheInfo.isCacheEnabled())
        {
          //for cacheable resources, eTag generation is already enabled.
          methodInfo.invoker.forceEtagGeneration();
        }
        return true;
View Full Code Here


    {
      writeConditionalResponse(response, methodReturn, outputHeaders);
    }
    else
    {
      CacheInfo cacheInfo = methodReturn.getCacheInfo();
      if (cacheInfo != null)
      {
        writeCacheHeaders(response, cacheInfo, methodReturn.getEtag(), methodReturn.getDateModified(), methodReturn.isEtagGenerationEnabled());
      }
View Full Code Here

    ConditionalResponse conditionalResponse = methodReturn.getConditionalResponse();
    response.setStatus(conditionalResponse.getStatus());

    EntityTag etag = conditionalResponse.getEtag();
    long dateModified = conditionalResponse.getLastModified();
    CacheInfo cacheInfo = methodReturn.getCacheInfo();

    if (cacheInfo != null)
    {
      writeCacheHeaders(response, cacheInfo, etag, dateModified, methodReturn.isEtagGenerationEnabled());
    }
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.server.rest.core.dispatch.CacheInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.