class NetServer extends Measured
Represents a TCP server
- Alphabetic
- By Inheritance
- NetServer
- Measured
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new NetServer(_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
-
def
actualPort(): Int
The actual port the server is listening on.
The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port * @return the actual port the server is listening on.
-
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(completionHandler: Handler[AsyncResult[Unit]]): Unit
Like io.vertx.scala.core.net.NetServer#close but supplying a handler that will be notified when close is complete.
Like io.vertx.scala.core.net.NetServer#close but supplying a handler that will be notified when close is complete. * @param completionHandler the handler
-
def
close(): Unit
Close the server.
Close the server. This will close any currently open connections. The close may not complete until after this method has returned.
-
def
closeFuture(): scala.concurrent.Future[Unit]
Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
connectHandler(handler: Handler[NetSocket]): NetServer
Supply a connect handler for this server.
Supply a connect handler for this server. The server can only have at most one connect handler at any one time. As the server accepts TCP or SSL connections it creates an instance of io.vertx.scala.core.net.NetSocket and passes it to the connect handler. * @return a reference to this, so the API can be used fluently
-
def
connectStream(): ReadStream[NetSocket]
Return the connect stream for this server.
Return the connect stream for this server. The server can only have at most one handler at any one time. As the server accepts TCP or SSL connections it creates an instance of io.vertx.scala.core.net.NetSocket and passes it to the connect stream . * @return the connect stream
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isMetricsEnabled(): Boolean
Whether the metrics are enabled for this measured object * @return
true
if metrics are enabled -
def
listen(localAddress: SocketAddress, listenHandler: Handler[AsyncResult[NetServer]]): NetServer
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param localAddress the local address to listen on
- listenHandler
handler that will be notified when listening or failed
- returns
a reference to this, so the API can be used fluently
-
def
listen(localAddress: SocketAddress): NetServer
Start listening on the specified local address, ignoring port and host configured in the NetServerOptions used when creating the server.
Start listening on the specified local address, ignoring port and host configured in the NetServerOptions used when creating the server.
The server may not be listening until some time after the call to listen has returned. * @param localAddress the local address to listen on
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int, listenHandler: Handler[AsyncResult[NetServer]]): NetServer
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param port the port to listen on
- listenHandler
handler that will be notified when listening or failed
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int): NetServer
Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the NetServerOptions used when creating the server.
Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the NetServerOptions used when creating the server.
Port
0
can be specified meaning "choose an random port".The server may not be listening until some time after the call to listen has returned. * @return a reference to this, so the API can be used fluently
-
def
listen(port: Int, host: String, listenHandler: Handler[AsyncResult[NetServer]]): NetServer
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param port the port to listen on
- host
the host to listen on
- listenHandler
handler that will be notified when listening or failed
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int, host: String): NetServer
Start listening on the specified port and host, ignoring port and host configured in the NetServerOptions used when creating the server.
Start listening on the specified port and host, ignoring port and host configured in the NetServerOptions used when creating the server.
Port
0
can be specified meaning "choose an random port".Host
0.0.0.0
can be specified meaning "listen on all available interfaces".The server may not be listening until some time after the call to listen has returned. * @return a reference to this, so the API can be used fluently
-
def
listen(listenHandler: Handler[AsyncResult[NetServer]]): NetServer
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.
Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param listenHandler handler that will be notified when listening or failed
- returns
a reference to this, so the API can be used fluently
-
def
listen(): NetServer
Start listening on the port and host as configured in the NetServerOptions used when creating the server.
Start listening on the port and host as configured in the NetServerOptions used when creating the server.
The server may not be listening until some time after the call to listen has returned. * @return a reference to this, so the API can be used fluently
-
def
listenFuture(localAddress: SocketAddress): scala.concurrent.Future[NetServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
listenFuture(port: Int): scala.concurrent.Future[NetServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
listenFuture(port: Int, host: String): scala.concurrent.Future[NetServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
listenFuture(): scala.concurrent.Future[NetServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )