public class HttpClientTransportOverSPDY extends Object implements HttpClientTransport
ClientConnectionFactory.HelperHTTP_CONNECTION_PROMISE_CONTEXT_KEY, HTTP_DESTINATION_CONTEXT_KEY| Constructor and Description |
|---|
HttpClientTransportOverSPDY(SPDYClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(SocketAddress address,
Map<String,Object> context)
Establishes a physical connection to the given
address. |
Connection |
newConnection(EndPoint endPoint,
Map<String,Object> context) |
HttpDestination |
newHttpDestination(Origin origin)
Creates a new, transport-specific,
HttpDestination object. |
void |
setHttpClient(HttpClient client)
Sets the
HttpClient instance on this transport. |
public HttpClientTransportOverSPDY(SPDYClient client)
public void setHttpClient(HttpClient client)
HttpClientTransportHttpClient instance on this transport.
This is needed because of a chicken-egg problem: in order to create the HttpClient
a HttpClientTransport is needed, that therefore cannot have a reference yet to the
HttpClient.setHttpClient in interface HttpClientTransportclient - the HttpClient that uses this transport.public HttpDestination newHttpDestination(Origin origin)
HttpClientTransportHttpDestination object.
HttpDestination controls the destination-connection cardinality: protocols like
HTTP have 1-N cardinality, while multiplexed protocols like SPDY have a 1-1 cardinality.newHttpDestination in interface HttpClientTransportorigin - the destination originHttpDestination objectpublic void connect(SocketAddress address, Map<String,Object> context)
HttpClientTransportaddress.connect in interface HttpClientTransportaddress - the address to connect tocontext - the context information to establish the connectionpublic Connection newConnection(EndPoint endPoint, Map<String,Object> context) throws IOException
newConnection in interface ClientConnectionFactoryendPoint - the EndPoint to link the newly created connection tocontext - the context data to create the connectionConnectionIOException - if the connection cannot be createdCopyright © 1995-2015 Webtide. All Rights Reserved.