java.lang.AutoCloseable, java.io.CloseableHttpConnection, HttpConnectionOverHTTPpublic interface Connection
extends java.io.Closeable
Connection represent a connection to a Destination and allow applications to send
requests via send(Request, Response.CompleteListener).
Connections are normally pooled by Destinations, but unpooled Connections
may be created by applications that want to do their own connection management via
Destination.newConnection(Promise) and close().
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
boolean |
isClosed() |
|
void |
send(Request request,
Response.CompleteListener listener) |
Sends a request with an associated response listener.
|
void send(Request request, Response.CompleteListener listener)
Request.send(Response.CompleteListener) will eventually call this method to send the request.
It is exposed to allow applications to send requests via unpooled connections.
request - the request to sendlistener - the response listenervoid close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableboolean isClosed()
close()Copyright © 1995–2017 Webtide. All rights reserved.