class HttpConnection extends AnyRef
Represents an HTTP connection.
HTTP/1.x connection provides an limited implementation, the following methods are implemented:
- Alphabetic
- By Inheritance
- HttpConnection
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new HttpConnection(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
Close the connection and all the currently active streams.
Close the connection and all the currently active streams.
An HTTP/2 connection will send a frame before.
-
def
closeHandler(handler: Handler[Unit]): HttpConnection
Set a close handler.
Set a close handler. The handler will get notified when the connection is closed. * @param handler the handler to be notified
- returns
a reference to this, so the API can be used fluently
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionHandler(handler: Handler[Throwable]): HttpConnection
Set an handler called when a connection error happens * @param handler the handler
Set an handler called when a connection error happens * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getWindowSize(): Int
- returns
the current connection window size or
-1
for HTTP/1.x
-
def
goAway(errorCode: Long, lastStreamId: Int, debugData: Buffer): HttpConnection
Send a go away frame to the remote endpoint of the connection.
Send a go away frame to the remote endpoint of the connection.
- a frame is sent to the to the remote endpoint with the
errorCode
anddebugData
- any stream created after the stream identified by
lastStreamId
will be closed - for an is different than
0
when all the remaining streams are closed this connection will be closed automatically
This is not implemented for HTTP/1.x. * @param errorCode the
GOAWAY
error code- lastStreamId
the last stream id
- debugData
additional debug data sent to the remote endpoint
- returns
a reference to this, so the API can be used fluently
- a frame is sent to the to the remote endpoint with the
-
def
goAway(errorCode: Long, lastStreamId: Int): HttpConnection
Like io.vertx.scala.core.http.HttpConnection#goAway with no buffer.
-
def
goAway(errorCode: Long): HttpConnection
Like io.vertx.scala.core.http.HttpConnection#goAway with a last stream id
-1
which means to disallow any new stream creation. -
def
goAwayHandler(handler: Handler[GoAway]): HttpConnection
Set an handler called when a frame is received.
Set an handler called when a frame is received.
This is not implemented for HTTP/1.x. * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
indicatedServerName(): String
Returns the SNI server name presented during the SSL handshake by the client.
Returns the SNI server name presented during the SSL handshake by the client. * @return the indicated server name
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isSsl(): Boolean
- returns
true if this io.vertx.scala.core.http.HttpConnection is encrypted via SSL/TLS.
-
def
localAddress(): SocketAddress
- returns
the remote address for this connection
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
ping(data: Buffer, pongHandler: Handler[AsyncResult[Buffer]]): HttpConnection
Send a frame to the remote endpoint.
Send a frame to the remote endpoint.
This is not implemented for HTTP/1.x. * @param data the 8 bytes data of the frame
- pongHandler
an async result handler notified with pong reply or the failure
- returns
a reference to this, so the API can be used fluently
-
def
pingFuture(data: Buffer): scala.concurrent.Future[Buffer]
Like ping but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
pingHandler(handler: Handler[Buffer]): HttpConnection
Set an handler notified when a frame is received from the remote endpoint.
Set an handler notified when a frame is received from the remote endpoint.
This is not implemented for HTTP/1.x. * @param handler the handler to be called when a
PING
is received- returns
a reference to this, so the API can be used fluently
-
def
remoteAddress(): SocketAddress
- returns
the remote address for this connection
-
def
remoteSettings(): Http2Settings
- returns
the current remote endpoint settings for this connection - this is not implemented for HTTP/1.xsee Http2Settings
-
def
remoteSettingsHandler(handler: Handler[Http2Settings]): HttpConnection
Set an handler that is called when remote endpoint Http2Settings are updated.
Set an handler that is called when remote endpoint Http2Settings are updated.
This is not implemented for HTTP/1.x. * @param handler the handler for remote endpoint settings
- returns
a reference to this, so the API can be used fluently
-
def
setWindowSize(windowSize: Int): HttpConnection
Update the current connection wide window size to a new size.
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. * @param windowSize the new window size
- returns
a reference to this, so the API can be used fluently
-
def
settings(): Http2Settings
- returns
the latest server settings acknowledged by the remote endpoint - this is not implemented for HTTP/1.xsee Http2Settings
-
def
shutdown(timeoutMs: Long): HttpConnection
Initiate a connection shutdown, a go away frame is sent and the connection is closed when all current streams will be closed or the
timeout
is fired.Initiate a connection shutdown, a go away frame is sent and the connection is closed when all current streams will be closed or the
timeout
is fired.This is not implemented for HTTP/1.x. * @param timeoutMs the timeout in milliseconds
- returns
a reference to this, so the API can be used fluently
-
def
shutdown(): HttpConnection
Initiate a connection shutdown, a go away frame is sent and the connection is closed when all current active streams are closed or after a time out of 30 seconds.
Initiate a connection shutdown, a go away frame is sent and the connection is closed when all current active streams are closed or after a time out of 30 seconds.
This is not implemented for HTTP/1.x. * @return a reference to this, so the API can be used fluently
-
def
shutdownHandler(handler: Handler[Unit]): HttpConnection
Set an handler called when a frame has been sent or received and all connections are closed.
Set an handler called when a frame has been sent or received and all connections are closed.
This is not implemented for HTTP/1.x. * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
updateSettings(settings: Http2Settings, completionHandler: Handler[AsyncResult[Unit]]): HttpConnection
Send to the remote endpoint an update of this endpoint settings
Send to the remote endpoint an update of this endpoint settings
The
completionHandler
will be notified when the remote endpoint has acknowledged the settings.This is not implemented for HTTP/1.x. * @param settings the new settings see Http2Settings
- completionHandler
the handler notified when the settings have been acknowledged by the remote endpoint
- returns
a reference to this, so the API can be used fluently
-
def
updateSettings(settings: Http2Settings): HttpConnection
Send to the remote endpoint an update of the server settings.
Send to the remote endpoint an update of the server settings.
This is not implemented for HTTP/1.x. * @param settings the new settings see Http2Settings
- returns
a reference to this, so the API can be used fluently
-
def
updateSettingsFuture(settings: Http2Settings): scala.concurrent.Future[Unit]
Like updateSettings but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )