java.lang.Object | |
↳ | org.apache.http.conn.scheme.Scheme |
Encapsulates specifics of a protocol scheme such as "http" or "https".
Schemes are identified by lowercase names.
Supported schemes are typically collected in a
SchemeRegistry
.
For example, to configure support for "https://" URLs, you could write code like the following:
Scheme https = new Scheme("https", new MySecureSocketFactory(), 443); SchemeRegistry.DEFAULT.register(https);
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Creates a new scheme.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Compares this scheme to an object.
|
||||||||||
|
Obtains the default port.
|
||||||||||
|
Obtains the scheme name.
|
||||||||||
|
Obtains the socket factory.
|
||||||||||
|
Obtains a hash code for this scheme.
|
||||||||||
|
Indicates whether this scheme allows for layered connections.
|
||||||||||
|
Resolves the correct port for this scheme.
|
||||||||||
|
Return a string representation of this object.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a new scheme.
Whether the created scheme allows for layered connections
depends on the class of
factory
.
name | the scheme name, for example "http". The name will be converted to lowercase. |
---|---|
factory | the factory for creating sockets for communication with this scheme |
port | the default port for this scheme |
Compares this scheme to an object.
obj | the object to compare with |
---|
true
iff the argument is equal to this scheme
Obtains the default port.
Obtains the scheme name.
Obtains the socket factory.
If this scheme is
layered
, the factory implements
LayeredSocketFactory
.
Obtains a hash code for this scheme.
Indicates whether this scheme allows for layered connections.
true
if layered connections are possible,
false
otherwise
Resolves the correct port for this scheme. Returns the given port if it is valid, the default port otherwise.
port | the port to be resolved, a negative number to obtain the default port |
---|
Return a string representation of this object.