ContainerRequest implements HttpRequestContext { @Override public ResponseBuilder evaluatePreconditions() { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } return Responses.preconditionFailed(); } ContainerRequest(
            WebApplication wa,
            String method,
            URI baseUri,
            URI requestUri,
            InBoundHeaders headers,
            InputStream entity);   ContainerRequest(ContainerRequest r); Map<String, Object> getProperties(); void setMethod(String method); void setUris(URI baseUri, URI requestUri); InputStream getEntityInputStream(); void setEntityInputStream(InputStream entity); void setHeaders(InBoundHeaders headers); void setSecurityContext(SecurityContext securityContext); SecurityContext getSecurityContext(); MessageBodyWorkers getMessageBodyWorkers(); @Override boolean isTracingEnabled(); @Override void trace(String message); @Override URI getBaseUri(); @Override UriBuilder getBaseUriBuilder(); @Override URI getRequestUri(); @Override UriBuilder getRequestUriBuilder(); @Override URI getAbsolutePath(); @Override UriBuilder getAbsolutePathBuilder(); @Override String getPath(); @Override String getPath(boolean decode); @Override List<PathSegment> getPathSegments(); @Override List<PathSegment> getPathSegments(boolean decode); @Override MultivaluedMap<String, String> getQueryParameters(); @Override MultivaluedMap<String, String> getQueryParameters(boolean decode); @Override String getHeaderValue(String name); @Override T getEntity(Class<T> type, Type genericType, Annotation[] as); void setEntity(final Class<T> type, final Type genericType,
                              final Annotation annotations[], final MediaType mediaType,
                              final MultivaluedMap<String, Object> httpHeaders, final T entity); @Override T getEntity(Class<T> type); @Override MediaType getAcceptableMediaType(List<MediaType> mediaTypes); @Override List<MediaType> getAcceptableMediaTypes(List<QualitySourceMediaType> priorityMediaTypes); @Override MultivaluedMap<String, String> getCookieNameValueMap(); @Override Form getFormParameters(); @Override MultivaluedMap<String, String> getRequestHeaders(); @Override List<String> getRequestHeader(String name); @Override List<MediaType> getAcceptableMediaTypes(); @Override List<Locale> getAcceptableLanguages(); @Override MediaType getMediaType(); @Override Locale getLanguage(); @Override Map<String, Cookie> getCookies(); @Override String getMethod(); @Override Variant selectVariant(List<Variant> variants); @Override ResponseBuilder evaluatePreconditions(); @Override ResponseBuilder evaluatePreconditions(EntityTag eTag); @Override ResponseBuilder evaluatePreconditions(Date lastModified); @Override ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag eTag); @Override Principal getUserPrincipal(); @Override boolean isUserInRole(String role); @Override boolean isSecure(); @Override String getAuthenticationScheme(); static final String VARY_HEADER; }
@Test(expected = IllegalArgumentException.class) public void testEvaluatePreconditionsDate() throws Exception { ContainerRequest cr = new ContainerRequest(new WebApplicationImpl(), "GET", new URI("base/uri"), new URI("request/uri"), new InBoundHeaders(), null); cr.evaluatePreconditions((Date) null); }
@Test(expected = IllegalArgumentException.class) public void testEvaluatePreconditionsEntityTag() throws Exception { ContainerRequest cr = new ContainerRequest(new WebApplicationImpl(), "GET", new URI("base/uri"), new URI("request/uri"), new InBoundHeaders(), null); cr.evaluatePreconditions((EntityTag) null); }
@Test(expected = IllegalArgumentException.class) public void testEvaluatePreconditionsBoth() throws Exception { ContainerRequest cr = new ContainerRequest(new WebApplicationImpl(), "GET", new URI("base/uri"), new URI("request/uri"), new InBoundHeaders(), null); cr.evaluatePreconditions(null, null); }