Class Origin
Class that groups the elements that uniquely identify a destination.
The elements are scheme
, host
, port
, a
Origin.Protocol
, a tag object that further distinguishes
destinations that have the same scheme, host, port and protocol,
and a Transport
.
In general it is possible that, for the same scheme, host and port,
the server can speak different protocols (for example, clear-text HTTP/1.1
and clear-text HTTP/2), so the Origin.Protocol
makes that distinction.
Furthermore, it may be desirable to have different destinations for
the same scheme, host, port and protocol.
For example, when using the PROXY protocol in a reverse proxy server, you
may want to be able to map the client ip:port to the destination tag
,
so that all the connections to the server associated to that destination can
specify the PROXY protocol bytes for that particular client connection.
Finally, it is necessary to have different destinations for the same
scheme, host, port, and protocol, but having different Transport
,
for example when the same server may be reached via TCP/IP but also via
Unix-Domain sockets.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
The representation of a network protocol. -
Constructor Summary
ConstructorDescriptionOrigin
(String scheme, String host, int port, Object tag, Origin.Protocol protocol) Origin
(String scheme, Origin.Address address) Origin
(String scheme, Origin.Address address, Object tag) Origin
(String scheme, Origin.Address address, Object tag, Origin.Protocol protocol) Origin
(String scheme, Origin.Address address, Object tag, Origin.Protocol protocol, Transport transport) -
Method Summary
-
Constructor Details
-
Origin
-
Origin
-
Origin
-
Origin
-
Origin
-
Origin
-
Origin
public Origin(String scheme, Origin.Address address, Object tag, Origin.Protocol protocol, Transport transport)
-
-
Method Details