vertx-lang-scala-docs_2.12 3.5.2.CR2 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package core
  Definition Classes
    scala
-  package net
  Definition Classes
    core
- ClientOptionsBase
- JdkSSLEngineOptions
- JksOptions
- NetClient
- NetClientOptions
- NetServer
- NetServerOptions
- NetSocket
- NetworkOptions
- OpenSSLEngineOptions
- PemKeyCertOptions
- PemTrustOptions
- PfxOptions
- ProxyOptions
- SelfSignedCertificate
- SocketAddress
- TCPSSLOptions

c

io.vertx.scala.core.net

# NetServer 

###
Companion object NetServer

#### class NetServer extends Measured

Represents a TCP server

Linear Supertypes
Measured, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. NetServer
2. Measured
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new NetServer(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  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

   returns

     the actual port the server is listening on.

5.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
6.  def asJava: AnyRef
   Definition Classes
     NetServer → Measured
7.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
8.  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.

   completionHandler

     the handler

9.  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.

10.  def closeFuture(): scala.concurrent.Future[Unit]

    Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

11.  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.

    returns

      a reference to this, so the API can be used fluently

12.  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 .

    returns

      the connect stream

13.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
14.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
15.  def exceptionHandler(handler: Handler[Throwable]): NetServer

    Set an exception handler called for socket errors happening before the connection is passed to the io.vertx.scala.core.net.NetServer#connectHandler, e.g during the TLS handshake.

    Set an exception handler called for socket errors happening before the connection is passed to the io.vertx.scala.core.net.NetServer#connectHandler, e.g during the TLS handshake.

    handler

      the handler to set

    returns

      a reference to this, so the API can be used fluently

16.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
17.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
18.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
19.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
20.  def isMetricsEnabled(): Boolean

    Whether the metrics are enabled for this measured object

    Whether the metrics are enabled for this measured object

    returns

      true if the metrics are enabled

    Definition Classes
      NetServer → Measured
21.  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.

    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

22.  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.

    localAddress

      the local address to listen on

    returns

      a reference to this, so the API can be used fluently

23.  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.

    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

24.  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.

    returns

      a reference to this, so the API can be used fluently

25.  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.

    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

26.  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.

    returns

      a reference to this, so the API can be used fluently

27.  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.

    listenHandler

      handler that will be notified when listening or failed

    returns

      a reference to this, so the API can be used fluently

28.  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.

    returns

      a reference to this, so the API can be used fluently

29.  def listenFuture(localAddress: SocketAddress): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

30.  def listenFuture(port: Int): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

31.  def listenFuture(port: Int, host: String): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

32.  def listenFuture(): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

33.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
34.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
35.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
36.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
37.  def toString(): String
    Definition Classes
      AnyRef → Any
38.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
39.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
40.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from Measured

### Inherited from AnyRef

### Inherited from Any

### Ungrouped