Interface ClientState

All Known Implementing Classes:
LocalClientState, ThreadLocalClientState

public interface ClientState
Represents the client state : - baseURI - current uri builder - current requestHeaders - current template parameters map - last response
  • Method Details

    • setCurrentBuilder

      void setCurrentBuilder(jakarta.ws.rs.core.UriBuilder currentBuilder)
      Sets the current builder
      Parameters:
      currentBuilder - the builder
    • getCurrentBuilder

      jakarta.ws.rs.core.UriBuilder getCurrentBuilder()
      Gets the current builder
      Returns:
    • setBaseURI

      void setBaseURI(URI baseURI)
      Sets the base URI
      Parameters:
      baseURI - baseURI
    • getBaseURI

      URI getBaseURI()
      Gets the base URI
      Returns:
      baseURI
    • setResponse

      void setResponse(jakarta.ws.rs.core.Response response)
      Sets Response
      Parameters:
      response - response
    • getResponse

      jakarta.ws.rs.core.Response getResponse()
      Gets Response
      Returns:
      response
    • setRequestHeaders

      void setRequestHeaders(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders)
      Sets the request headers
      Parameters:
      requestHeaders - request headers
    • getRequestHeaders

      jakarta.ws.rs.core.MultivaluedMap<String,String> getRequestHeaders()
      Gets the request headers
      Returns:
      request headers, may be immutable
    • setTemplates

      void setTemplates(jakarta.ws.rs.core.MultivaluedMap<String,String> templates)
      Sets the map containing template name and value pairs
      Parameters:
      templates -
    • getTemplates

      jakarta.ws.rs.core.MultivaluedMap<String,String> getTemplates()
      Gets the templates map
      Returns:
      templates
    • reset

      void reset()
      Resets the current state to the baseURI
    • newState

      ClientState newState(URI baseURI, jakarta.ws.rs.core.MultivaluedMap<String,String> headers, jakarta.ws.rs.core.MultivaluedMap<String,String> templates)
      The factory method for creating a new state. Example, proxy and WebClient.fromClient will use this method when creating subresource proxies and new web clients respectively to ensure thet stay thread-local if needed
      Parameters:
      baseURI - baseURI
      headers - request headers, can be null
      templates - initial templates map, can be null
      Returns:
      client state
    • newState

      default ClientState newState(URI baseURI, jakarta.ws.rs.core.MultivaluedMap<String,String> headers, jakarta.ws.rs.core.MultivaluedMap<String,String> templates, Map<String,Object> properties)
      The factory method for creating a new state. Example, proxy and WebClient.fromClient will use this method when creating subresource proxies and new web clients respectively to ensure thet stay thread-local if needed
      Parameters:
      baseURI - baseURI
      headers - request headers, can be null
      templates - initial templates map, can be null
      properties - additional properties, could be null
      Returns:
      client state