コード例 #1
0
 private Message handleRequestWithoutAcceptCharset(final Request request) {
   if (request.containsHeader(Header.RANGE)) {
     return handleRequestWithRange(request);
   } else {
     return handleRequestWithoutRange(request);
   }
 }
コード例 #2
0
 private Message handleRequestWithoutAcceptLanguage(final Request request) {
   if (request.containsHeader(Header.ACCEPT_CHARSET)) {
     return handleRequestWithAcceptCharset(request);
   } else {
     return handleRequestWithoutAcceptCharset(request);
   }
 }
コード例 #3
0
 private Message handleRequestWithoutAccept(final Request request) {
   if (request.containsHeader(Header.ACCEPT_LANGUAGE)) {
     return handleRequestWithAcceptLanguage(request);
   } else {
     return handleRequestWithoutAcceptLanguage(request);
   }
 }
コード例 #4
0
 private Message handleRequestWithoutIfNoneMatch(Request request) throws IOException {
   if (request.containsHeader(Header.IF_MODIFIED_SINCE)) {
     return handleRequestWithIfModifiedSince(request);
   } else {
     return handleRequestWithoutIfModifiedSince(request);
   }
 }
コード例 #5
0
 private Message handleRequestWithoutIfUnmodifiedSince(Request request) throws IOException {
   if (request.containsHeader(Header.IF_NONE_MATCH)) {
     return handleRequestWithIfNoneMatch();
   } else {
     return handleRequestWithoutIfNoneMatch(request);
   }
 }
コード例 #6
0
 private final Message getResource(final Request request) throws IOException {
   return request.containsHeader(Header.IF_MATCH)
       ? handleRequestWithIfMatch(request)
       : handleRequestWithoutIfMatch(request);
 }