Package org.jboss.resteasy.core.interception.jaxrs

## Class PreMatchContainerRequestContext

- java.lang.Object
- - org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext

- All Implemented Interfaces:
    `javax.ws.rs.container.ContainerRequestContext`, `SuspendableContainerRequestContext`
  Direct Known Subclasses:
    `PostMatchContainerRequestContext`, `ResponseContainerRequestContext`

      public class PreMatchContainerRequestContext
      extends Object
      implements SuspendableContainerRequestContext

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected HttpRequest` | `httpRequest` |
    `protected javax.ws.rs.core.Response` | `response` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PreMatchContainerRequestContext​(HttpRequest request)` | Deprecated.
    `PreMatchContainerRequestContext​(HttpRequest request, javax.ws.rs.container.ContainerRequestFilter[] requestFilters, Supplier<BuiltResponse> continuation)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `abortWith​(javax.ws.rs.core.Response response)` |
    `BuiltResponse` | `filter()` |
    `List<Locale>` | `getAcceptableLanguages()` |
    `List<javax.ws.rs.core.MediaType>` | `getAcceptableMediaTypes()` |
    `Map<String,​javax.ws.rs.core.Cookie>` | `getCookies()` |
    `Date` | `getDate()` |
    `InputStream` | `getEntityStream()` |
    `javax.ws.rs.core.MultivaluedMap<String,​String>` | `getHeaders()` |
    `String` | `getHeaderString​(String name)` |
    `HttpRequest` | `getHttpRequest()` |
    `Locale` | `getLanguage()` |
    `int` | `getLength()` |
    `javax.ws.rs.core.MediaType` | `getMediaType()` |
    `String` | `getMethod()` |
    `Object` | `getProperty​(String name)` |
    `Collection<String>` | `getPropertyNames()` |
    `javax.ws.rs.core.Request` | `getRequest()` |
    `javax.ws.rs.core.Response` | `getResponseAbortedWith()` |
    `javax.ws.rs.core.SecurityContext` | `getSecurityContext()` |
    `javax.ws.rs.core.UriInfo` | `getUriInfo()` |
    `boolean` | `hasEntity()` |
    `void` | `removeProperty​(String name)` |
    `void` | `resume()` | Resumes the current request, and proceeds to the next request filter, if any, or to the resource method.
    `void` | `resume​(Throwable t)` | Aborts the current request with the given exception.
    `void` | `setEntityStream​(InputStream entityStream)` |
    `void` | `setMethod​(String method)` |
    `void` | `setProperty​(String name, Object object)` |
    `void` | `setRequestUri​(URI requestUri)` |
    `void` | `setRequestUri​(URI baseUri, URI requestUri)` |
    `void` | `setSecurityContext​(javax.ws.rs.core.SecurityContext context)` |
    `boolean` | `startedContinuation()` |
    `void` | `suspend()` | Suspends the current request.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### httpRequest

          protected final HttpRequest httpRequest

    - #### response

          protected javax.ws.rs.core.Response response

  - ### Constructor Detail

    - #### PreMatchContainerRequestContext

          @Deprecated
          public PreMatchContainerRequestContext​(HttpRequest request)

      Deprecated.

    - #### PreMatchContainerRequestContext

          public PreMatchContainerRequestContext​(HttpRequest request,
                                                 javax.ws.rs.container.ContainerRequestFilter[] requestFilters,
                                                 Supplier<BuiltResponse> continuation)

  - ### Method Detail

    - #### getHttpRequest

          public HttpRequest getHttpRequest()

    - #### getResponseAbortedWith

          public javax.ws.rs.core.Response getResponseAbortedWith()

    - #### getProperty

          public Object getProperty​(String name)

      Specified by:
        `getProperty` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getPropertyNames

          public Collection<String> getPropertyNames()

      Specified by:
        `getPropertyNames` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### setProperty

          public void setProperty​(String name,
                                  Object object)

      Specified by:
        `setProperty` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### removeProperty

          public void removeProperty​(String name)

      Specified by:
        `removeProperty` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getUriInfo

          public javax.ws.rs.core.UriInfo getUriInfo()

      Specified by:
        `getUriInfo` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### setRequestUri

          public void setRequestUri​(URI requestUri)
                             throws IllegalStateException

      Specified by:
        `setRequestUri` in interface `javax.ws.rs.container.ContainerRequestContext`
      Throws:
        `IllegalStateException`

    - #### setRequestUri

          public void setRequestUri​(URI baseUri,
                                    URI requestUri)
                             throws IllegalStateException

      Specified by:
        `setRequestUri` in interface `javax.ws.rs.container.ContainerRequestContext`
      Throws:
        `IllegalStateException`

    - #### getMethod

          public String getMethod()

      Specified by:
        `getMethod` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### setMethod

          public void setMethod​(String method)

      Specified by:
        `setMethod` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getHeaders

          public javax.ws.rs.core.MultivaluedMap<String,​String> getHeaders()

      Specified by:
        `getHeaders` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getDate

          public Date getDate()

      Specified by:
        `getDate` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getLanguage

          public Locale getLanguage()

      Specified by:
        `getLanguage` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getLength

          public int getLength()

      Specified by:
        `getLength` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getMediaType

          public javax.ws.rs.core.MediaType getMediaType()

      Specified by:
        `getMediaType` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getAcceptableMediaTypes

          public List<javax.ws.rs.core.MediaType> getAcceptableMediaTypes()

      Specified by:
        `getAcceptableMediaTypes` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getAcceptableLanguages

          public List<Locale> getAcceptableLanguages()

      Specified by:
        `getAcceptableLanguages` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getCookies

          public Map<String,​javax.ws.rs.core.Cookie> getCookies()

      Specified by:
        `getCookies` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### hasEntity

          public boolean hasEntity()

      Specified by:
        `hasEntity` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getEntityStream

          public InputStream getEntityStream()

      Specified by:
        `getEntityStream` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### setEntityStream

          public void setEntityStream​(InputStream entityStream)

      Specified by:
        `setEntityStream` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getSecurityContext

          public javax.ws.rs.core.SecurityContext getSecurityContext()

      Specified by:
        `getSecurityContext` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### setSecurityContext

          public void setSecurityContext​(javax.ws.rs.core.SecurityContext context)

      Specified by:
        `setSecurityContext` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getRequest

          public javax.ws.rs.core.Request getRequest()

      Specified by:
        `getRequest` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### getHeaderString

          public String getHeaderString​(String name)

      Specified by:
        `getHeaderString` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### suspend

          public void suspend()

      Description copied from interface: `SuspendableContainerRequestContext`
      Suspends the current request. This makes the current request asynchronous. No further request filter is executed until this request is resumed. No reply is going to be sent to the client until this request is resumed either with `SuspendableContainerRequestContext.resume()` or aborted with `SuspendableContainerRequestContext.resume(Throwable)` or `ContainerRequestContext.abortWith(javax.ws.rs.core.Response)`.
      Specified by:
        `suspend` in interface `SuspendableContainerRequestContext`

    - #### abortWith

          public void abortWith​(javax.ws.rs.core.Response response)

      Specified by:
        `abortWith` in interface `javax.ws.rs.container.ContainerRequestContext`

    - #### resume

          public void resume()

      Description copied from interface: `SuspendableContainerRequestContext`
      Resumes the current request, and proceeds to the next request filter, if any, or to the resource method.
      Specified by:
        `resume` in interface `SuspendableContainerRequestContext`

    - #### resume

          public void resume​(Throwable t)

      Description copied from interface: `SuspendableContainerRequestContext`
      Aborts the current request with the given exception. This behaves as if the request filter threw this exception synchronously, which means exceptions may be mapped via exception mappers, response filters will run and async response callbacks will be called with this exception.
      Specified by:
        `resume` in interface `SuspendableContainerRequestContext`
      Parameters:
        `t` - the exception to send back to the client, as mapped by the application.

    - #### filter

          public BuiltResponse filter()

    - #### startedContinuation

          public boolean startedContinuation()