Changes since
the last release

com.ebay.sdk.util
Class SdkProxySelector

java.lang.Object
  extended by java.net.ProxySelector
      extended by com.ebay.sdk.util.SdkProxySelector

public class SdkProxySelector
extends java.net.ProxySelector

Title: SdkProxySelector

Description: utility class for http proxy setting

Copyright: Copyright (c) 2009

Company: eBay Inc.

Version:
1.0
Author:
boyang

Constructor Summary
SdkProxySelector(java.lang.String proxyHost, int proxyPort)
          constructor, create a basic ProxySelector.
SdkProxySelector(java.lang.String proxyHost, int proxyPort, java.lang.String username, java.lang.String password)
          constructor, create a ProxySelector with username/password authentication.
 
Method Summary
 void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
          Method called by the handlers when it failed to connect to one of the proxies returned by select().
 void register()
          register this ProxySelector, let the proxy setting take effect.
 java.util.List<java.net.Proxy> select(java.net.URI uri)
          This is the method that the handlers will call.
 
Methods inherited from class java.net.ProxySelector
getDefault, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SdkProxySelector

public SdkProxySelector(java.lang.String proxyHost,
                        int proxyPort)
constructor, create a basic ProxySelector.


SdkProxySelector

public SdkProxySelector(java.lang.String proxyHost,
                        int proxyPort,
                        java.lang.String username,
                        java.lang.String password)
constructor, create a ProxySelector with username/password authentication.

Method Detail

connectFailed

public void connectFailed(java.net.URI uri,
                          java.net.SocketAddress sa,
                          java.io.IOException ioe)
Method called by the handlers when it failed to connect to one of the proxies returned by select().

Specified by:
connectFailed in class java.net.ProxySelector

select

public java.util.List<java.net.Proxy> select(java.net.URI uri)
This is the method that the handlers will call. Returns a List of proxy.

Specified by:
select in class java.net.ProxySelector

register

public void register()
register this ProxySelector, let the proxy setting take effect.


Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations: developer-relations@ebay.com
© 2004-2009 eBay Inc. All rights reserved.