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

Examples of org.cruxframework.crux.core.server.rest.core.EntityTag


          expires = ret.getCacheInfo().defineExpires(dateModified);
        }
      }
      resourceStateHandler.add(key, dateModified, expires, etag);
      ret.setDateModified(dateModified);
      EntityTag entityTag = (etag != null)?new EntityTag(etag):null;
      ret.setEtag(entityTag);
    }
    else
    {
      resourceStateHandler.remove(key);
View Full Code Here


  }

  private ConditionalResponse evaluateEtagPreConditions(ResourceState resourceState)
  {
    ConditionalResponse result = null;
    EntityTag eTag = (resourceState!= null && resourceState.getEtag() != null)?new EntityTag(resourceState.getEtag()):null;
    List<String> ifMatch = request.getHttpHeaders().getRequestHeader(HttpHeaderNames.IF_MATCH);
    if (ifMatch != null && ifMatch.size() > 0)
    {
      if (!ifMatch(convertEtag(ifMatch), eTag))
      {
View Full Code Here

      {
         value = value.substring(0, value.length() - 1);
      }
      if (value.startsWith("W/"))
      {
         return new EntityTag(value.substring(2), true);
      }
      return new EntityTag(value);
   }
View Full Code Here

  private static void writeConditionalResponse(HttpResponse response, MethodReturn methodReturn, HttpServletResponseHeaders outputHeaders)
  {
    ConditionalResponse conditionalResponse = methodReturn.getConditionalResponse();
    response.setStatus(conditionalResponse.getStatus());

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

    if (cacheInfo != null)
    {
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.server.rest.core.EntityTag

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.