org.apache.http.impl.client
Class DefaultUserTokenHandlerHC4

java.lang.Object
  extended by org.apache.http.impl.client.DefaultUserTokenHandlerHC4
All Implemented Interfaces:
org.apache.http.client.UserTokenHandler

@Immutable
public class DefaultUserTokenHandlerHC4
extends java.lang.Object
implements org.apache.http.client.UserTokenHandler

Default implementation of UserTokenHandler. This class will use an instance of Principal as a state object for HTTP connections, if it can be obtained from the given execution context. This helps ensure persistent connections created with a particular user identity within a particular security context can be reused by the same user only.

DefaultUserTokenHandlerHC4 will use the user principle of connection based authentication schemes such as NTLM or that of the SSL session with the client authentication turned on. If both are unavailable, null token will be returned.

Since:
4.0

Field Summary
static DefaultUserTokenHandlerHC4 INSTANCE
           
 
Constructor Summary
DefaultUserTokenHandlerHC4()
           
 
Method Summary
 java.lang.Object getUserToken(org.apache.http.protocol.HttpContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DefaultUserTokenHandlerHC4 INSTANCE
Constructor Detail

DefaultUserTokenHandlerHC4

public DefaultUserTokenHandlerHC4()
Method Detail

getUserToken

public java.lang.Object getUserToken(org.apache.http.protocol.HttpContext context)
Specified by:
getUserToken in interface org.apache.http.client.UserTokenHandler