IT. Expert System.

Android Reference

Proxy


java.net

Class Proxy



  • public class Proxy
    extends Object
    This class represents proxy server settings. A created instance of Proxy stores a type and an address and is immutable. There are three types of proxies:
    • DIRECT
    • HTTP
    • SOCKS
      • Nested Class Summary

        Nested Classes
        Modifier and Type Class and Description
        static class Proxy.Type
        Enum class for the proxy type.
      • Field Summary

        Fields
        Modifier and Type Field and Description
        static Proxy NO_PROXY
        Represents the proxy type setting Proxy.Type.DIRECT.
      • Field Detail

        • NO_PROXY

          public static final Proxy NO_PROXY
          Represents the proxy type setting Proxy.Type.DIRECT. It tells protocol handlers that there is no proxy to be used. The address is set to null.
      • Constructor Detail

        • Proxy

          public Proxy(Proxy.Type type,
               SocketAddress sa)
          Creates a new Proxy instance. SocketAddress must NOT be null when type is either Proxy.Type.HTTP or Proxy.Type.SOCKS. To create a Proxy instance representing the proxy type Proxy.Type.DIRECT, use Proxy.NO_PROXY instead of this constructor.
          Parameters:
          type - the proxy type of this instance.
          sa - the proxy address of this instance.
          Throws:
          IllegalArgumentException - if the parameter type is set to Proxy.Type.DIRECT or the value for SocketAddress is null.
      • Method Detail

        • type

          public Proxy.Type type()
          Gets the type of this Proxy instance.
          Returns:
          the stored proxy type.
        • address

          public SocketAddress address()
          Gets the address of this Proxy instance.
          Returns:
          the stored proxy address or null if the proxy type is DIRECT.
        • toString

          public String toString()
          Gets a textual representation of this Proxy instance. The string includes the two parts type.toString() and address.toString() if address is not null.
          Overrides:
          toString in class Object
          Returns:
          the representing string of this proxy.
        • equals

          public final boolean equals(Object obj)
          Compares the specified obj to this Proxy instance and returns whether they are equal or not. The given object must be an instance of Proxy with the same address and the same type value to be equal.
          Overrides:
          equals in class Object
          Parameters:
          obj - the object to compare with this instance.
          Returns:
          true if the given object represents the same Proxy as this instance, false otherwise.
          See Also:
          hashCode()


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 409 / 158779600. Delta: 0.04068 с