HTTP/1.x connection provides an limited implementation, the following methods are implemented:
| Modifier and Type | Method and Description |
|---|---|
| public Future | |
| public default void | close(Handler<AsyncResult<Void>>
the handler to be completed when the connection is closed handler)Close the connection and all the currently active streams. |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe handler to be notified handler)Set a close handler. |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe handler handler)Set an handler called when a connection error happens |
| public default int | |
| public default HttpConnection | goAway(long errorCode)
Like |
| public default HttpConnection | |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe GOAWAY error code errorCode, int the last stream id lastStreamId, Buffer additional debug data sent to the remote endpoint debugData)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Send a go away frame to the remote endpoint of the connection. |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe handler handler)Set an handler called when a GOAWAY frame is received. |
| public String | Returns: the indicated server nameReturns the SNI server name presented during the SSL handshake by the client. |
| public boolean | |
| public SocketAddress | Returns: the local address for this connection, possiblynull (e.g a server bound on a domain socket)
If useProxyProtocol is set to true, the address returned will be of the proxy.
|
| public SocketAddress | localAddress(boolean real)
Like |
| public X509Certificate[] | Returns: an ordered array of the peer certificates. Returns null if connection is not SSL.
Deprecated
instead use
peerCertificates() or sslSession()
Note Java SE 5+ recommends to use javax.net.ssl.SSLSession#getPeerCertificates() instead of of javax.net.ssl.SSLSession#getPeerCertificateChain() which this method is based on. |
| public List | Returns: an ordered list of the peer certificates. Returns null if connection is not SSL.
|
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe 8 bytes data of the frame data, Handler<AsyncResult<Buffer>> an async result handler notified with pong reply or the failure pongHandler)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Send a PING frame to the remote endpoint. |
| public Future | ping(Buffer data)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Same as |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe handler to be called when a PING is received handler)Set an handler notified when a PING frame is received from the remote endpoint. |
| public SocketAddress | Returns: the remote address for this connection, possiblynull (e.g a server bound on a domain socket).
If useProxyProtocol is set to true, the address returned will be of the actual connecting client.
|
| public SocketAddress | remoteAddress(boolean real)
Like |
| public Http2Settings | Returns: the current remote endpoint settings for this connection - this is not implemented for HTTP/1.x
|
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe handler for remote endpoint settings handler)Set an handler that is called when remote endpoint |
| public Http2Settings | Returns: the latest server settings acknowledged by the remote endpoint - this is not implemented for HTTP/1.x
|
| public default HttpConnection | Returns: a reference to this, so the API can be used fluentlythe new window size windowSize)Update the current connection wide window size to a new size. |
| public default void | shutdown(Handler<AsyncResult<Void>> handler)
Shutdown a 30 seconds timeout ( |
| public default Future | |
| public default void | shutdown(long timeout, Handler<AsyncResult<Void>> handler)
Deprecated
instead use
shutdown(long, TimeUnit, Handler)
Like |
| public default Future | shutdown(long timeoutMs)
Deprecated
instead use
shutdown(long, TimeUnit)
Like |
| public default void | shutdown(long
the amount of time after which all resources are forcibly closed timeout, TimeUnit the of the timeout unit, Handler<AsyncResult<Void>> the handler notified with the result handler)Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests
are processed, otherwise after a |
| public Future | shutdown(long timeout, TimeUnit unit)
Like |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe handler handler)Set an handler called when a GOAWAY frame has been sent or received and all connections are closed. |
| public SSLSession | Returns: SSLSession associated with the underlying socket. Returns null if connection is not SSL.
|
| public Future | Returns: a future completed with the resultthe new settings settings)Send to the remote endpoint an update of the server settings. |
| public HttpConnection | Returns: a reference to this, so the API can be used fluentlythe new settings settings, Handler<AsyncResult<Void>> the handler notified when the settings have been acknowledged by the remote endpoint completionHandler)Send to the remote endpoint an update of this endpoint settings
The |
| close | back to summary |
|---|---|
| public Future Like | |
| close | back to summary |
|---|---|
| public default void close(Handler<AsyncResult<Void>> handler) Close the connection and all the currently active streams. An HTTP/2 connection will send a GOAWAY frame before.
| |
| closeHandler | back to summary |
|---|---|
| public HttpConnection closeHandler(Handler<Void> handler) Set a close handler. The handler will get notified when the connection is closed.
| |
| exceptionHandler | back to summary |
|---|---|
| public HttpConnection exceptionHandler(Handler<Throwable> handler) Set an handler called when a connection error happens
| |
| getWindowSize | back to summary |
|---|---|
public default int getWindowSize()
| |
| goAway | back to summary |
|---|---|
| public default HttpConnection goAway(long errorCode) Like
| |
| goAway | back to summary |
|---|---|
| public default HttpConnection goAway(long errorCode, int lastStreamId) Like
| |
| goAway | back to summary |
|---|---|
| public HttpConnection goAway(long errorCode, int lastStreamId, Buffer debugData)
References Deprecated
See corresponding docs for further information. Send a go away frame to the remote endpoint of the connection.
This is not implemented for HTTP/1.x.
| |
| goAwayHandler | back to summary |
|---|---|
| public HttpConnection goAwayHandler(@Nullable Handler<GoAway> handler) Set an handler called when a GOAWAY frame is received. This is not implemented for HTTP/1.x.
| |
| indicatedServerName | back to summary |
|---|---|
| public String indicatedServerName() Returns the SNI server name presented during the SSL handshake by the client.
| |
| isSsl | back to summary |
|---|---|
public boolean isSsl()
| |
| localAddress | back to summary |
|---|---|
public SocketAddress localAddress()
| |
| localAddress | back to summary |
|---|---|
| public SocketAddress localAddress(boolean real) Like | |
| peerCertificateChain | back to summary |
|---|---|
| public X509Certificate[] peerCertificateChain() throws SSLPeerUnverifiedException
Deprecated instead use Note Java SE 5+ recommends to use javax.net.ssl.SSLSession#getPeerCertificates() instead of
of javax.net.ssl.SSLSession#getPeerCertificateChain() which this method is based on. Use
| |
| peerCertificates | back to summary |
|---|---|
public List
| |
| ping | back to summary |
|---|---|
| public HttpConnection ping(Buffer data, Handler<AsyncResult<Buffer>> pongHandler)
References Deprecated
See corresponding docs for further information. Send a PING frame to the remote endpoint. This is not implemented for HTTP/1.x.
| |
| ping | back to summary |
|---|---|
| public Future References Deprecated
See corresponding docs for further information. Same as | |
| pingHandler | back to summary |
|---|---|
| public HttpConnection pingHandler(@Nullable Handler<Buffer> handler) Set an handler notified when a PING frame is received from the remote endpoint. This is not implemented for HTTP/1.x.
| |
| remoteAddress | back to summary |
|---|---|
public SocketAddress remoteAddress()
| |
| remoteAddress | back to summary |
|---|---|
| public SocketAddress remoteAddress(boolean real) Like | |
| remoteSettings | back to summary |
|---|---|
public Http2Settings remoteSettings()
| |
| remoteSettingsHandler | back to summary |
|---|---|
| public HttpConnection remoteSettingsHandler(Handler<Http2Settings> handler) Set an handler that is called when remote endpoint This is not implemented for HTTP/1.x.
| |
| settings | back to summary |
|---|---|
public Http2Settings settings()
| |
| setWindowSize | back to summary |
|---|---|
| public default HttpConnection setWindowSize(int windowSize) Update the current connection wide window size to a new size. Increasing this value, gives better performance when several data streams are multiplexed This is not implemented for HTTP/1.x.
| |
| shutdown | back to summary |
|---|---|
| public default void shutdown(Handler<AsyncResult<Void>> handler) Shutdown a 30 seconds timeout ( | |
| shutdown | back to summary |
|---|---|
| public default Future Like | |
| shutdown | back to summary |
|---|---|
| public default void shutdown(long timeout, Handler<AsyncResult<Void>> handler)
Deprecated instead use Like
| |
| shutdown | back to summary |
|---|---|
| public default Future Deprecated instead use Like
| |
| shutdown | back to summary |
|---|---|
| public default void shutdown(long timeout, TimeUnit unit, Handler<AsyncResult<Void>> handler) Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests
are processed, otherwise after a
| |
| shutdown | back to summary |
|---|---|
| public Future Like | |
| shutdownHandler | back to summary |
|---|---|
| public HttpConnection shutdownHandler(@Nullable Handler<Void> handler) Set an handler called when a GOAWAY frame has been sent or received and all connections are closed. This is not implemented for HTTP/1.x.
| |
| sslSession | back to summary |
|---|---|
public SSLSession sslSession()
| |
| updateSettings | back to summary |
|---|---|
| public Future Send to the remote endpoint an update of the server settings. This is not implemented for HTTP/1.x.
| |
| updateSettings | back to summary |
|---|---|
| public HttpConnection updateSettings(Http2Settings settings, Handler<AsyncResult<Void>> completionHandler) Send to the remote endpoint an update of this endpoint settings
The This is not implemented for HTTP/1.x.
| |