|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.conn.scheme.Scheme
SchemePortResolver
for default port
resolution and Registry
for socket factory lookups.
@Contract(threading=IMMUTABLE) @Deprecated public final class 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 registry = new SchemeRegistry(); registry.register(https);
Constructor Summary | |
---|---|
Scheme(String name,
int port,
SchemeSocketFactory factory)
Deprecated. Creates a new scheme. |
|
Scheme(String name,
SocketFactory factory,
int port)
Deprecated. (4.1) Use Scheme(String, int, SchemeSocketFactory) |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Deprecated. |
int |
getDefaultPort()
Deprecated. Obtains the default port. |
String |
getName()
Deprecated. Obtains the scheme name. |
SchemeSocketFactory |
getSchemeSocketFactory()
Deprecated. Obtains the socket factory. |
SocketFactory |
getSocketFactory()
Deprecated. (4.1) Use getSchemeSocketFactory() |
int |
hashCode()
Deprecated. |
boolean |
isLayered()
Deprecated. Indicates whether this scheme allows for layered connections. |
int |
resolvePort(int port)
Deprecated. Resolves the correct port for this scheme. |
String |
toString()
Deprecated. Return a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Scheme(String name, int port, SchemeSocketFactory factory)
factory
.
name
- the scheme name, for example "http".
The name will be converted to lowercase.port
- the default port for this schemefactory
- the factory for creating sockets for communication
with this scheme@Deprecated public Scheme(String name, SocketFactory factory, int port)
Scheme(String, int, SchemeSocketFactory)
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 schemeport
- the default port for this schemeMethod Detail |
---|
public final int getDefaultPort()
@Deprecated public final SocketFactory getSocketFactory()
getSchemeSocketFactory()
layered
, the factory implements
LayeredSocketFactory
.
public final SchemeSocketFactory getSchemeSocketFactory()
layered
, the factory implements
LayeredSchemeSocketFactory
.
public final String getName()
public final boolean isLayered()
true
if layered connections are possible,
false
otherwisepublic final int resolvePort(int port)
port
- the port to be resolved,
a negative number to obtain the default port
public final String toString()
toString
in class Object
public final boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |