com.microsoft.tfs.core.config.auth
Class DefaultTransportRequestHandler

java.lang.Object
  extended by com.microsoft.tfs.core.config.auth.DefaultTransportRequestHandler
All Implemented Interfaces:
com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler

public class DefaultTransportRequestHandler
extends java.lang.Object
implements com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler

A default implementation of TransportRequestHandler that handles FederatedAuthExceptions by getting OAuth WRAP credentials from Azure ACS. The username and password in the profile supplied during construction is used to get the WRAP credentials.

Since:
TEE-SDK-11.0
Thread-safety:
unknown

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler
com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status
 
Constructor Summary
DefaultTransportRequestHandler(ConnectionInstanceData connectionInstanceData, ConfigurableHTTPClientFactory clientFactory)
          Constructs a DefaultTransportAuthHandler.
 
Method Summary
protected  ConfigurableHTTPClientFactory getClientFactory()
           
protected  ConnectionInstanceData getConnectionInstanceData()
           
 com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status handleException(com.microsoft.tfs.core.ws.runtime.client.SOAPService service, com.microsoft.tfs.core.ws.runtime.client.SOAPRequest request, java.lang.Exception exception, java.util.concurrent.atomic.AtomicBoolean cancel)
          
 com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status handleSuccess(com.microsoft.tfs.core.ws.runtime.client.SOAPService service, com.microsoft.tfs.core.ws.runtime.client.SOAPRequest request)
          
 com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status prepareRequest(com.microsoft.tfs.core.ws.runtime.client.SOAPService service, com.microsoft.tfs.core.ws.runtime.client.SOAPRequest request, java.util.concurrent.atomic.AtomicBoolean cancel)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTransportRequestHandler

public DefaultTransportRequestHandler(ConnectionInstanceData connectionInstanceData,
                                      ConfigurableHTTPClientFactory clientFactory)
Constructs a DefaultTransportAuthHandler.

Parameters:
connectionInstanceData - the ConnectionInstanceData for this Connection
clientFactory - an ConfigurableHTTPClientFactory to use to create new HttpClients to get WRAP credentials with (must not be null); should be the same factory TFSConnection is using so proxy settings, etc., are used
Method Detail

getConnectionInstanceData

protected ConnectionInstanceData getConnectionInstanceData()

getClientFactory

protected ConfigurableHTTPClientFactory getClientFactory()

prepareRequest

public com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status prepareRequest(com.microsoft.tfs.core.ws.runtime.client.SOAPService service,
                                                                                              com.microsoft.tfs.core.ws.runtime.client.SOAPRequest request,
                                                                                              java.util.concurrent.atomic.AtomicBoolean cancel)

Specified by:
prepareRequest in interface com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler

handleException

public com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status handleException(com.microsoft.tfs.core.ws.runtime.client.SOAPService service,
                                                                                               com.microsoft.tfs.core.ws.runtime.client.SOAPRequest request,
                                                                                               java.lang.Exception exception,
                                                                                               java.util.concurrent.atomic.AtomicBoolean cancel)

Specified by:
handleException in interface com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler

handleSuccess

public com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler.Status handleSuccess(com.microsoft.tfs.core.ws.runtime.client.SOAPService service,
                                                                                             com.microsoft.tfs.core.ws.runtime.client.SOAPRequest request)

Specified by:
handleSuccess in interface com.microsoft.tfs.core.ws.runtime.client.TransportRequestHandler


© 2015 Microsoft. All rights reserved.