org.vertx.scala.core.net

NetServer

final class NetServer extends Self with ServerSSLSupport with ServerTCPSupport with Closeable

Represents a TCP or SSL server

If an instance is instantiated from an event loop then the handlers of the instance will always be called on that same event loop. If an instance is instantiated from some other arbitrary Java thread (i.e. when running embedded) then and event loop will be assigned to the instance and used when any of its handlers are called.

Instances of this class are thread-safe.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. NetServer
  2. Closeable
  3. ServerTCPSupport
  4. TCPSupport
  5. NetworkSupport
  6. ServerSSLSupport
  7. SSLSupport
  8. AsJava
  9. Self
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type CloseType = AnyRef { ... /* 2 definitions in type refinement */ }

    Definition Classes
    Closeable
  2. type J = java.core.net.NetServer

    The internal type of the Java wrapped class.

    The internal type of the Java wrapped class.

    Definition Classes
    NetServerCloseableServerTCPSupportTCPSupportNetworkSupportServerSSLSupportSSLSupport → AsJava

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val asJava: java.core.net.NetServer

    The internal instance of the Java wrapped class.

    The internal instance of the Java wrapped class.

    Definition Classes
    NetServer → AsJava
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def close(handler: (AsyncResult[Void]) ⇒ Unit): Unit

    Close this org.vertx.scala.core.Closeable instance asynchronously and notifies the handler once done.

    Close this org.vertx.scala.core.Closeable instance asynchronously and notifies the handler once done.

    Definition Classes
    Closeable
  10. def close(): Unit

    Close this org.vertx.scala.core.Closeable instance asynchronously.

    Close this org.vertx.scala.core.Closeable instance asynchronously.

    Definition Classes
    Closeable
  11. def connectHandler(connectHandler: (NetSocket) ⇒ Unit): 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 org.vertx.scala.core.net.NetSocket and passes it to the connect handler.

    returns

    a reference to this so multiple method calls can be chained together

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def getAcceptBacklog: Int

    returns

    The accept backlog

    Definition Classes
    ServerTCPSupport
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def getKeyStorePassword: String

    returns

    Get the key store password

    Definition Classes
    SSLSupport
  18. def getKeyStorePath: String

    returns

    Get the key store path

    Definition Classes
    SSLSupport
  19. def getReceiveBufferSize: Int

    returns

    The receive buffer size

    Definition Classes
    NetworkSupport
  20. def getSendBufferSize: Int

    returns

    The send buffer size

    Definition Classes
    NetworkSupport
  21. def getSoLinger: Int

    returns

    the value of TCP so linger

    Definition Classes
    TCPSupport
  22. def getTrafficClass: Int

    returns

    the value of traffic class

    Definition Classes
    NetworkSupport
  23. def getTrustStorePassword: String

    returns

    Get trust store password

    Definition Classes
    SSLSupport
  24. def getTrustStorePath: String

    returns

    Get the trust store path

    Definition Classes
    SSLSupport
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. def host(): String

    The host.

  27. def isClientAuthRequired: Boolean

    Is client auth required?

    Is client auth required?

    Definition Classes
    ServerSSLSupport
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def isReuseAddress: Boolean

    returns

    The value of reuse address

    Definition Classes
    NetworkSupport
  30. def isSSL: Boolean

    returns

    Is SSL enabled?

    Definition Classes
    SSLSupport
  31. def isTCPKeepAlive: Boolean

    returns

    true if TCP keep alive is enabled

    Definition Classes
    TCPSupport
  32. def isTCPNoDelay: Boolean

    returns

    true if Nagle's algorithm is disabled.

    Definition Classes
    TCPSupport
  33. def isUsePooledBuffers: Boolean

    returns

    true if pooled buffers are used

    Definition Classes
    TCPSupport
  34. def listen(port: Int, host: String, listenHandler: (java.core.AsyncResult[NetServer]) ⇒ Unit): NetServer

    Instruct the server to listen for incoming connections on the specified port and host.

    Instruct the server to listen for incoming connections on the specified port and host. host can be a host name or an IP address.

  35. def listen(port: Int, host: String): NetServer

    Tell the server to start listening on port port and hostname or ip address given by host.

    Tell the server to start listening on port port and hostname or ip address given by host. Be aware this is an async operation and the server may not bound on return of the method.

  36. def listen(port: Int, listenHandler: (java.core.AsyncResult[NetServer]) ⇒ Unit): NetServer

    Instruct the server to listen for incoming connections on the specified port and all available interfaces.

  37. def listen(port: Int): NetServer

    Tell the server to start listening on all available interfaces and port port.

    Tell the server to start listening on all available interfaces and port port. Be aware this is an async operation and the server may not bound on return of the method.

  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. def port(): 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

  42. def setAcceptBacklog(backlog: Int): NetServer.this.type

    Set the accept backlog

    Set the accept backlog

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    ServerTCPSupport
  43. def setClientAuthRequired(required: Boolean): NetServer.this.type

    Set required to true if you want the server to request client authentication from any connecting clients.

    Set required to true if you want the server to request client authentication from any connecting clients. This is an extra level of security in SSL, and requires clients to provide client certificates. Those certificates must be added to the server trust store.

    returns

    A reference to this, so multiple invocations can be chained together.

    Definition Classes
    ServerSSLSupport
  44. def setKeyStorePassword(pwd: String): NetServer.this.type

    Set the password for the SSL key store.

    Set the password for the SSL key store. This method should only be used in SSL mode, i.e. after org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true.

    returns

    A reference to this, so multiple invocations can be chained together.

    Definition Classes
    SSLSupport
  45. def setKeyStorePath(path: String): NetServer.this.type

    Set the path to the SSL key store.

    Set the path to the SSL key store. This method should only be used in SSL mode, i.e. after org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true.

    The SSL key store is a standard Java Key Store, and will contain the client certificate. Client certificates are only required if the server requests client authentication.

    returns

    A reference to this, so multiple invocations can be chained together.

    Definition Classes
    SSLSupport
  46. def setReceiveBufferSize(size: Int): NetServer.this.type

    Set the receive buffer size for connections created by this instance to size in bytes.

    Set the receive buffer size for connections created by this instance to size in bytes.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    NetworkSupport
  47. def setReuseAddress(reuse: Boolean): NetServer.this.type

    Set the reuseAddress setting for connections created by this instance to reuse.

    Set the reuseAddress setting for connections created by this instance to reuse.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    NetworkSupport
  48. def setSSL(ssl: Boolean): NetServer.this.type

    If ssl is true, this signifies that any connections will be SSL connections.

    If ssl is true, this signifies that any connections will be SSL connections.

    returns

    A reference to this, so multiple invocations can be chained together.

    Definition Classes
    SSLSupport
  49. def setSendBufferSize(size: Int): NetServer.this.type

    Set the send buffer size for connections created by this instance to size in bytes.

    Set the send buffer size for connections created by this instance to size in bytes.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    NetworkSupport
  50. def setSoLinger(linger: Int): NetServer.this.type

    Set the TCP soLinger setting for connections created by this instance to linger.

    Set the TCP soLinger setting for connections created by this instance to linger. Using a negative value will disable soLinger.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    TCPSupport
  51. def setTCPKeepAlive(keepAlive: Boolean): NetServer.this.type

    Set the TCP keepAlive setting for connections created by this instance to keepAlive.

    Set the TCP keepAlive setting for connections created by this instance to keepAlive.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    TCPSupport
  52. def setTCPNoDelay(tcpNoDelay: Boolean): NetServer.this.type

    If tcpNoDelay is set to true then Nagle's algorithm will turned off for the TCP connections created by this instance.

    If tcpNoDelay is set to true then Nagle's algorithm will turned off for the TCP connections created by this instance.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    TCPSupport
  53. def setTrafficClass(trafficClass: Int): NetServer.this.type

    Set the trafficClass setting for connections created by this instance to trafficClass.

    Set the trafficClass setting for connections created by this instance to trafficClass.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    NetworkSupport
  54. def setTrustStorePassword(pwd: String): NetServer.this.type

    Set the password for the SSL trust store.

    Set the password for the SSL trust store. This method should only be used in SSL mode, i.e. after org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true.

    returns

    A reference to this, so multiple invocations can be chained together.

    Definition Classes
    SSLSupport
  55. def setTrustStorePath(path: String): NetServer.this.type

    Set the path to the SSL trust store.

    Set the path to the SSL trust store. This method should only be used in SSL mode, i.e. after org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true.

    The trust store is a standard Java Key Store, and should contain the certificates of any servers that the client trusts.

    returns

    A reference to this, so multiple invocations can be chained together.

    Definition Classes
    SSLSupport
  56. def setUsePooledBuffers(pooledBuffers: Boolean): NetServer.this.type

    Set if vertx should use pooled buffers for performance reasons.

    Set if vertx should use pooled buffers for performance reasons. Doing so will give the best throughput but may need a bit higher memory footprint.

    returns

    a reference to this so multiple method calls can be chained together

    Definition Classes
    TCPSupport
  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  58. def toString(): String

    Definition Classes
    AnyRef → Any
  59. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. def wrap[X](doStuff: ⇒ X): NetServer.this.type

    Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types

    Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types

    Attributes
    protected[this]
    Definition Classes
    Self

Inherited from Closeable

Inherited from ServerTCPSupport

Inherited from TCPSupport

Inherited from NetworkSupport

Inherited from ServerSSLSupport

Inherited from SSLSupport

Inherited from AsJava

Inherited from Self

Inherited from AnyRef

Inherited from Any

Ungrouped