Class ClientMap

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clean()
      Flushes the client/value map (it will be empty after invocation).
      jakarta.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> getCustomHeaders​(jakarta.ws.rs.client.Client client)  
      java.lang.String getValue​(jakarta.ws.rs.client.Client client)
      Gets the value associated to this client in the map.
      static ClientMap instance()  
      void remove​(jakarta.ws.rs.client.Client client)
      Removes a client from the map and then calls its close method to free resources.
      void setCustomHeaders​(jakarta.ws.rs.client.Client client, jakarta.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headersMap)  
      void update​(jakarta.ws.rs.client.Client client, java.lang.String value)
      Puts a new client/value pair in the map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • instance

        public static ClientMap instance()
      • update

        public void update​(jakarta.ws.rs.client.Client client,
                           java.lang.String value)
        Puts a new client/value pair in the map. If client already exists, the value is replaced.
        Parameters:
        client - RestEasy client
        value - Value to associate to this client - normally an access token
      • remove

        public void remove​(jakarta.ws.rs.client.Client client)
        Removes a client from the map and then calls its close method to free resources.
        Parameters:
        client - Client to remove
      • getValue

        public java.lang.String getValue​(jakarta.ws.rs.client.Client client)
        Gets the value associated to this client in the map.
        Parameters:
        client - RestEasy client
        Returns:
        A string value. If there is no entry for client in the map, returns null
      • clean

        public void clean()
        Flushes the client/value map (it will be empty after invocation). Call this method when your application is being shut-down.
      • getCustomHeaders

        public jakarta.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> getCustomHeaders​(jakarta.ws.rs.client.Client client)
      • setCustomHeaders

        public void setCustomHeaders​(jakarta.ws.rs.client.Client client,
                                     jakarta.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headersMap)