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", 443, new MySecureSocketFactory()); SchemeRegistry.DEFAULT.register(https);
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new scheme.
| |||||||||||
This constructor is deprecated.
Use
Scheme(String, int, SchemeSocketFactory)
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Obtains the default port.
| |||||||||||
Obtains the scheme name.
| |||||||||||
Obtains the socket factory.
| |||||||||||
This method is deprecated.
Use
getSchemeSocketFactory()
| |||||||||||
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. |
---|---|
port | the default port for this scheme |
factory | the factory for creating sockets for communication with this scheme |
This constructor is deprecated.
Use Scheme(String, int, SchemeSocketFactory)
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 |
Obtains the default port.
Obtains the scheme name.
Obtains the socket factory.
If this scheme is layered
, the factory implements
LayeredSchemeSocketFactory
.
This method is deprecated.
Use getSchemeSocketFactory()
Obtains the socket factory.
If this scheme is layered
, the factory implements
LayeredSocketFactory
.
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.