Deprecated
(4.3) use org. for default port
resolution and org. for socket factory lookups.
SchemeRegistry.
For example, to configure support for "https://" URLs, you could write code like the following:
Scheme https = new Scheme("https", 443, new MySecureSocketFactory());
SchemeRegistry registry = new SchemeRegistry();
registry.register(https);
| Modifier and Type | Field and Description |
|---|---|
| private final int | defaultPort
The default port for this scheme |
| private final boolean | layered
Indicates whether this scheme allows for layered connections |
| private final String | name
The name of this scheme, in lowercase. |
| private final SchemeSocketFactory | socketFactory
The socket factory for this scheme |
| private String |
| Access | Constructor and Description |
|---|---|
| public | Scheme(final String
the scheme name, for example "http".
The name will be converted to lowercase. name, final int the default port for this scheme port, final SchemeSocketFactory the factory for creating sockets for communication
with this scheme factory)
Deprecated
as a consequence of
Creates a new scheme.
SchemeSocketFactory being deprecated.
|
| public | Scheme(final String
the scheme name, for example "http".
The name will be converted to lowercase. name, final SocketFactory the factory for creating sockets for communication
with this scheme factory, final int the default port for this scheme port)
Deprecated
(4.1) Use
Creates a new scheme.
Scheme(String, int, SchemeSocketFactory)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. |
| public int | |
| public String | |
| public SchemeSocketFactory | Returns: the socket factory for this scheme
Deprecated
as a consequence of
Obtains the socket factory.
SchemeSocketFactory being deprecated.
|
| public SocketFactory | Returns: the socket factory for this scheme
Deprecated
(4.1) Use
Obtains the socket factory.
getSchemeSocketFactory()
|
| public int | |
| public boolean | Returns: true if layered connections are possible,
false otherwiseIndicates whether this scheme allows for layered connections. |
| public int | Returns: the given port or the defaultPortthe port to be resolved,
a negative number to obtain the default port port)Resolves the correct port for this scheme. |
| public String | Returns: a human-readable string description of this schemeOverrides java. |
| defaultPort | back to summary |
|---|---|
| private final int defaultPort The default port for this scheme | |
| layered | back to summary |
|---|---|
| private final boolean layered Indicates whether this scheme allows for layered connections | |
| name | back to summary |
|---|---|
| private final String name The name of this scheme, in lowercase. (e.g. http, https) | |
| socketFactory | back to summary |
|---|---|
| private final SchemeSocketFactory socketFactory
Deprecated as a consequence of The socket factory for this scheme | |
| stringRep | back to summary |
|---|---|
| private String stringRep A string representation, for | |
| Scheme | back to summary |
|---|---|
| public Scheme(final String name, final int port, final SchemeSocketFactory factory)
Deprecated as a consequence of Creates a new scheme.
Whether the created scheme allows for layered connections
depends on the class of
| |
| Scheme | back to summary |
|---|---|
| public Scheme(final String name, final SocketFactory factory, final int port)
Deprecated (4.1) Use Creates a new scheme.
Whether the created scheme allows for layered connections
depends on the class of
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDefaultPort | back to summary |
|---|---|
| public int getDefaultPort() Obtains the default port.
| |
| getName | back to summary |
|---|---|
| public String getName() Obtains the scheme name.
| |
| getSchemeSocketFactory | back to summary |
|---|---|
| public SchemeSocketFactory getSchemeSocketFactory()
Deprecated as a consequence of Obtains the socket factory.
If this scheme is
| |
| getSocketFactory | back to summary |
|---|---|
| public SocketFactory getSocketFactory()
Deprecated (4.1) Use Obtains the socket factory.
If this scheme is
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isLayered | back to summary |
|---|---|
| public boolean isLayered() Indicates whether this scheme allows for layered connections.
| |
| resolvePort | back to summary |
|---|---|
| public int resolvePort(final int port) Resolves the correct port for this scheme. Returns the given port if it is valid, the default port otherwise.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return a string representation of this object. | |