org.vertx.scala.core.net

NetClient

final class NetClient extends Self with TCPSupport with ClientSSLSupport

A TCP/SSL client.

Multiple connections to different servers can be made using the same instance.

This client supports a configurable number of connection attempts and a configurable delay between attempts.

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 using embedded) then an 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. NetClient
  2. ClientSSLSupport
  3. SSLSupport
  4. TCPSupport
  5. NetworkSupport
  6. AsJava
  7. Self
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type J = java.core.net.NetClient

    The internal type of the Java wrapped class.

    The internal type of the Java wrapped class.

    Definition Classes
    NetClientClientSSLSupportSSLSupportTCPSupportNetworkSupport → 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.NetClient

    The internal instance of the Java wrapped class.

    The internal instance of the Java wrapped class.

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

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

    Close the client.

    Close the client. Any sockets which have not been closed manually will be closed here.

  10. def connect(port: Int, host: String, connectHandler: (AsyncResult[NetSocket]) ⇒ Unit): NetClient

    Attempt to open a connection to a server at the specific port and host.

    Attempt to open a connection to a server at the specific port and host. host can be a valid host name or IP address. The connect is done asynchronously and on success, a org.vertx.scala.core.net.NetSocket instance is supplied via the connectHandler instance.

    returns

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

  11. def connect(port: Int, connectCallback: (AsyncResult[NetSocket]) ⇒ Unit): NetClient

    Attempt to open a connection to a server at the specific port and host localhost The connect is done asynchronously and on success, a org.vertx.scala.core.net.NetSocket instance is supplied via the connectHandler instance.

    Attempt to open a connection to a server at the specific port and host localhost The connect is done asynchronously and on success, a org.vertx.scala.core.net.NetSocket instance is supplied via the connectHandler instance.

    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. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def getConnectTimeout: Int

    Returns the connect timeout in milliseconds.

    Returns the connect timeout in milliseconds.

    returns

    The connect timeout in milliseconds.

  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 getReconnectAttempts: Int

    Get the number of reconnect attempts.

    Get the number of reconnect attempts.

    returns

    The number of reconnect attempts.

  21. def getReconnectInterval: Long

    Get the reconnect interval, in milliseconds.

    Get the reconnect interval, in milliseconds.

    returns

    The reconnect interval in milliseconds.

  22. def getSendBufferSize: Int

    returns

    The send buffer size

    Definition Classes
    NetworkSupport
  23. def getSoLinger: Int

    returns

    the value of TCP so linger

    Definition Classes
    TCPSupport
  24. def getTrafficClass: Int

    returns

    the value of traffic class

    Definition Classes
    NetworkSupport
  25. def getTrustStorePassword: String

    returns

    Get trust store password

    Definition Classes
    SSLSupport
  26. def getTrustStorePath: String

    returns

    Get the trust store path

    Definition Classes
    SSLSupport
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  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 isTrustAll: Boolean

    returns

    true if this client will trust all server certificates.

    Definition Classes
    ClientSSLSupport
  34. def isUsePooledBuffers: Boolean

    returns

    true if pooled buffers are used

    Definition Classes
    TCPSupport
  35. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  38. def setConnectTimeout(timeout: Int): NetClient

    Set the connect timeout in milliseconds.

    Set the connect timeout in milliseconds.

    returns

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

  39. def setKeyStorePassword(pwd: String): NetClient.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
  40. def setKeyStorePath(path: String): NetClient.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
  41. def setReceiveBufferSize(size: Int): NetClient.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
  42. def setReconnectAttempts(attempts: Int): NetClient

    Set the number of reconnection attempts.

    Set the number of reconnection attempts. In the event a connection attempt fails, the client will attempt to connect a further number of times, before it fails. Default value is zero.

  43. def setReconnectInterval(interval: Long): NetClient

    Set the reconnect interval, in milliseconds.

  44. def setReuseAddress(reuse: Boolean): NetClient.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
  45. def setSSL(ssl: Boolean): NetClient.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
  46. def setSendBufferSize(size: Int): NetClient.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
  47. def setSoLinger(linger: Int): NetClient.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
  48. def setTCPKeepAlive(keepAlive: Boolean): NetClient.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
  49. def setTCPNoDelay(tcpNoDelay: Boolean): NetClient.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
  50. def setTrafficClass(trafficClass: Int): NetClient.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
  51. def setTrustAll(trustAll: Boolean): NetClient.this.type

    If you want an SSL client to trust *all* server certificates rather than match them against those in its trust store, you can set this to true.

    If you want an SSL client to trust *all* server certificates rather than match them against those in its trust store, you can set this to true.

    Use this with caution as you may be exposed to "main in the middle" attacks

    trustAll

    Set to true if you want to trust all server certificates

    Definition Classes
    ClientSSLSupport
  52. def setTrustStorePassword(pwd: String): NetClient.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
  53. def setTrustStorePath(path: String): NetClient.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
  54. def setUsePooledBuffers(pooledBuffers: Boolean): NetClient.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
  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  56. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def wrap[X](doStuff: ⇒ X): NetClient.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 ClientSSLSupport

Inherited from SSLSupport

Inherited from TCPSupport

Inherited from NetworkSupport

Inherited from AsJava

Inherited from Self

Inherited from AnyRef

Inherited from Any

Ungrouped