Interface ApplicationContext

All Superinterfaces:
InitialProperties, javax.ws.rs.core.UriInfo
All Known Implementing Classes:
ApplicationContextImpl

public interface ApplicationContext extends javax.ws.rs.core.UriInfo, InitialProperties
Provides access to ContainerRequest, ContainerResponse and other context information information.
Version:
$Id: $
Author:
Andrey Parfonov
  • Method Details

    • getParameterValues

      List<String> getParameterValues()
      Should be used to pass template values in context by using returned list in matching at UriPattern.match(String, List) . List will be cleared during matching.
      Returns:
      the list for template values
    • setParameterNames

      void setParameterNames(List<String> parameterNames)
      Pass in context list of path template parameters .
      Parameters:
      parameterNames - list of templates parameters
      See Also:
    • addMatchedResource

      void addMatchedResource(Object resource)
      Add ancestor resource, according to JSR-311:

      Entries are ordered according in reverse request URI matching order, with the root resource last.

      So add each new resource at the begin of list.
      Parameters:
      resource - the resource e. g. resource class, sub-resource method or sub-resource locator
    • addMatchedURI

      void addMatchedURI(String uri)
      Add ancestor resource, according to JSR-311:

      Entries are ordered in reverse request URI matching order, with the root resource URI last.

      So add each new URI at the begin of list.
      Parameters:
      uri - the partial part of that matched to resource class, sub-resource method or sub-resource locator
    • getAttributes

      Map<String,Object> getAttributes()
      Returns:
      get mutable runtime attributes
    • getRequest

      javax.ws.rs.core.Request getRequest()
      Returns:
      request
      See Also:
      • Request
    • getHttpHeaders

      javax.ws.rs.core.HttpHeaders getHttpHeaders()
      Returns:
      request HTTP headers
      See Also:
      • HttpHeaders
    • getInitialProperties

      InitialProperties getInitialProperties()
      Returns:
      properties
      See Also:
    • getSecurityContext

      javax.ws.rs.core.SecurityContext getSecurityContext()
      Returns:
      security context
      See Also:
      • SecurityContext
    • getContainerRequest

      GenericContainerRequest getContainerRequest()
      Returns:
      JAX-RS request
      See Also:
    • getUriInfo

      javax.ws.rs.core.UriInfo getUriInfo()
      Returns:
      URI info
      See Also:
      • UriInfo
    • getContainerResponse

      GenericContainerResponse getContainerResponse()
      Returns:
      JAX-RS request
      See Also:
    • getDependencySupplier

      DependencySupplier getDependencySupplier()
      Returns:
      instance of actual dependency resolver. It will be used for injection fields annotated with 'inject' annotation and constructor parameters not annotated with JAX-RS annotations
    • getProviders

      ProviderBinder getProviders()
      Returns:
      set of providers
      See Also:
      • Providers