org.vertx.scala.core

Vertx

final class Vertx extends AnyRef

The control centre of the Vert.x Core API.

You should normally only use a single instance of this class throughout your application. If you are running in the Vert.x container an instance will be provided to you.

If you are using Vert.x embedded, you can create an instance using one of the static core package newVertx methods.

This class acts as a factory for TCP/SSL and HTTP/HTTPS servers and clients, SockJS servers, and provides an instance of the event bus, file system and shared data classes, as well as methods for setting and cancelling timers.

Instances of this class are thread-safe.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Vertx
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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.Vertx

  8. def cancelTimer(id: Long): Boolean

    Cancel the timer with the specified id.

    Cancel the timer with the specified id. Returns true if the timer was successfully cancelled, or false if the timer does not exist.

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def createDatagramSocket(family: Option[InternetProtocolFamily] = None): DatagramSocket

    Create a new org.vertx.scala.core.datagram.DatagramSocket.

    family

    optional user provided org.vertx.scala.core.datagram.InternetProtocolFamily to use for multicast. If scala.None, it's up to the operation system to detect it's default.

    returns

    socket the created org.vertx.scala.core.datagram.DatagramSocket.

  11. def createDnsClient(dnsServers: InetSocketAddress*): DnsClient

    Return the org.vertx.scala.core.dns.DnsClient

  12. def createHttpClient(): HttpClient

    Create a HTTP/HTTPS client.

  13. def createHttpServer(): HttpServer

    Create an HTTP/HTTPS server.

  14. def createNetClient(): NetClient

    Create a TCP/SSL client.

  15. def createNetServer(): NetServer

    Create a TCP/SSL server.

  16. def createSockJSServer(httpServer: HttpServer): SockJSServer

    Create a SockJS server that wraps an HTTP server.

  17. def currentContext(): Context

    returns

    The current context.

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

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

    Definition Classes
    AnyRef → Any
  20. val eventBus: EventBus

    The event bus.

  21. val fileSystem: FileSystem

    The File system object.

  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. def isEventLoop: Boolean

    Is the current thread an event loop thread?

    Is the current thread an event loop thread?

    returns

    true if current thread is an event loop thread.

  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def isWorker: Boolean

    Is the current thread an worker thread?

    Is the current thread an worker thread?

    returns

    true if current thread is an worker thread.

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

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

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

    Definition Classes
    AnyRef
  31. def runOnContext(action: ⇒ Unit): Unit

    Put the handler on the event queue for the current loop (or worker context) so it will be run asynchronously ASAP after this event has been processed.

  32. def setPeriodic(delay: Long, handler: (Long) ⇒ Unit): Long

    Set a periodic timer to fire every delay milliseconds, at which point handler will be called with the id of the timer.

    Set a periodic timer to fire every delay milliseconds, at which point handler will be called with the id of the timer.

    returns

    the unique ID of the timer.

  33. def setTimer(delay: Long, handler: (Long) ⇒ Unit): Long

    Set a one-shot timer to fire after delay milliseconds, at which point handler will be called with the id of the timer.

    Set a one-shot timer to fire after delay milliseconds, at which point handler will be called with the id of the timer.

    returns

    The unique ID of the timer.

  34. val sharedData: SharedData

    The shared data object.

  35. def stop(): Unit

    Stop the eventbus and any resource managed by the eventbus.

  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
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped