Package gluu.scim2.client
Class ClientMap
- java.lang.Object
- 
- gluu.scim2.client.ClientMap
 
- 
 public class ClientMap extends Object A singleton object that holds a mapping of the RestEasy clients used by objects that extend theAbstractScimClientclass and the access tokens they are using.The method AbstractScimClient#invoke(Object, Method, Object[])takes charge of the maintenance of this map at every service invocation, while the classAuthorizationInjectionFiltermakes use of this object to properly inject access tokens in authorization headers.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclean()Flushes the client/value map (it will be empty after invocation).jakarta.ws.rs.core.MultivaluedMap<String,String>getCustomHeaders(jakarta.ws.rs.client.Client client)StringgetValue(jakarta.ws.rs.client.Client client)Gets the value associated to this client in the map.static ClientMapinstance()voidremove(jakarta.ws.rs.client.Client client)Removes a client from the map and then calls its close method to free resources.voidsetCustomHeaders(jakarta.ws.rs.client.Client client, jakarta.ws.rs.core.MultivaluedMap<String,String> headersMap)voidupdate(jakarta.ws.rs.client.Client client, String value)Puts a new client/value pair in the map.
 
- 
- 
- 
Method Detail- 
instancepublic static ClientMap instance() 
 - 
updatepublic void update(jakarta.ws.rs.client.Client client, 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
 
 - 
removepublic 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
 
 - 
getValuepublic 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
 
 - 
cleanpublic void clean() Flushes the client/value map (it will be empty after invocation). Call this method when your application is being shut-down.
 - 
getCustomHeaderspublic jakarta.ws.rs.core.MultivaluedMap<String,String> getCustomHeaders(jakarta.ws.rs.client.Client client) 
 
- 
 
-