org.vertx.java.core.impl

## Class DefaultVertx

- java.lang.Object
- - org.vertx.java.core.Vertx
  - - org.vertx.java.core.impl.VertxInternal
    - - org.vertx.java.core.impl.DefaultVertx

    public class DefaultVertx
    extends VertxInternal

### Constructor Summary

Constructors
Constructor and Description
`DefaultVertx()`
`DefaultVertx(int port, java.lang.String hostname)`
`DefaultVertx(java.lang.String hostname)`

### Method Summary

Methods
`boolean` `cancelTimer(long id)` Cancel the timer with the specified `id`.
`Context` `createEventLoopContext()`
`HttpClient` `createHttpClient()` Create a HTTP/HTTPS client
`HttpServer` `createHttpServer()` Create an HTTP/HTTPS server
`NetClient` `createNetClient()` Create a TCP/SSL client
`NetServer` `createNetServer()` Create a TCP/SSL server
`SockJSServer` `createSockJSServer(HttpServer httpServer)` Create a SockJS server that wraps an HTTP server
`EventBus` `eventBus()` The event bus
`FileSystem` `fileSystem()` The File system object
`java.util.concurrent.Executor` `getAcceptorPool()`
`java.util.concurrent.ExecutorService` `getBackgroundPool()`
`Context` `getOrAssignContext()`
`org.jboss.netty.channel.socket.nio.NioWorkerPool` `getWorkerPool()`
`boolean` `isEventLoop()` Is the current thread an event loop thread?
`boolean` `isWorker()` Is the current thread an worker thread?
`void` `reportException(java.lang.Throwable t)`
`void` `runOnLoop(Handler<java.lang.Void> handler)` Put the handler on the event queue for this loop so it will be run asynchronously ASAP after this event has been processed
`long` `setPeriodic(long delay, Handler<java.lang.Long> handler)` Set a periodic timer to fire every `delay` milliseconds, at which point `handler` will be called with the id of the timer.
`long` `setTimer(long delay, Handler<java.lang.Long> handler)` Set a one-shot timer to fire after `delay` milliseconds, at which point `handler` will be called with the id of the timer.
`SharedData` `sharedData()` The shared data object
`java.util.Map<ServerID,DefaultHttpServer>` `sharedHttpServers()`
`java.util.Map<ServerID,DefaultNetServer>` `sharedNetServers()`
`Context` `startInBackground(java.lang.Runnable runnable)`
`Context` `startOnEventLoop(java.lang.Runnable runnable)`

### Methods inherited from class org.vertx.java.core.Vertx

`newVertx, newVertx, newVertx`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultVertx

    public DefaultVertx()

#### DefaultVertx

    public DefaultVertx(java.lang.String hostname)

#### DefaultVertx

    public DefaultVertx(int port,
                java.lang.String hostname)

### Method Detail

#### createNetServer

    public NetServer createNetServer()

Description copied from class: `Vertx`
Create a TCP/SSL server

Specified by:
  `createNetServer` in class `Vertx`

#### createNetClient

    public NetClient createNetClient()

Description copied from class: `Vertx`
Create a TCP/SSL client

Specified by:
  `createNetClient` in class `Vertx`

#### fileSystem

    public FileSystem fileSystem()

Description copied from class: `Vertx`
The File system object

Specified by:
  `fileSystem` in class `Vertx`

#### sharedData

    public SharedData sharedData()

Description copied from class: `Vertx`
The shared data object

Specified by:
  `sharedData` in class `Vertx`

#### createHttpServer

    public HttpServer createHttpServer()

Description copied from class: `Vertx`
Create an HTTP/HTTPS server

Specified by:
  `createHttpServer` in class `Vertx`

#### createHttpClient

    public HttpClient createHttpClient()

Description copied from class: `Vertx`
Create a HTTP/HTTPS client

Specified by:
  `createHttpClient` in class `Vertx`

#### createSockJSServer

    public SockJSServer createSockJSServer(HttpServer httpServer)

Description copied from class: `Vertx`
Create a SockJS server that wraps an HTTP server

Specified by:
  `createSockJSServer` in class `Vertx`

#### eventBus

    public EventBus eventBus()

Description copied from class: `Vertx`
The event bus

Specified by:
  `eventBus` in class `Vertx`

#### startOnEventLoop

    public Context startOnEventLoop(java.lang.Runnable runnable)

Specified by:
  `startOnEventLoop` in class `VertxInternal`

#### startInBackground

    public Context startInBackground(java.lang.Runnable runnable)

Specified by:
  `startInBackground` in class `VertxInternal`

#### isEventLoop

    public boolean isEventLoop()

Description copied from class: `Vertx`
Is the current thread an event loop thread?

Specified by:
  `isEventLoop` in class `Vertx`
Returns:
  true if current thread is an event loop thread

#### isWorker

    public boolean isWorker()

Description copied from class: `Vertx`
Is the current thread an worker thread?

Specified by:
  `isWorker` in class `Vertx`
Returns:
  true if current thread is an worker thread

#### setPeriodic

    public long setPeriodic(long delay,
                   Handler<java.lang.Long> handler)

Description copied from class: `Vertx`
Set a periodic timer to fire every `delay` milliseconds, at which point `handler` will be called with the id of the timer.

Specified by:
  `setPeriodic` in class `Vertx`
Returns:
  the unique ID of the timer

#### setTimer

    public long setTimer(long delay,
                Handler<java.lang.Long> handler)

Description copied from class: `Vertx`
Set a one-shot timer to fire after `delay` milliseconds, at which point `handler` will be called with the id of the timer.

Specified by:
  `setTimer` in class `Vertx`
Returns:
  the unique ID of the timer

#### runOnLoop

    public void runOnLoop(Handler<java.lang.Void> handler)

Description copied from class: `Vertx`
Put the handler on the event queue for this loop so it will be run asynchronously ASAP after this event has been processed

Specified by:
  `runOnLoop` in class `Vertx`

#### getBackgroundPool

    public java.util.concurrent.ExecutorService getBackgroundPool()

Specified by:
  `getBackgroundPool` in class `VertxInternal`

#### getWorkerPool

    public org.jboss.netty.channel.socket.nio.NioWorkerPool getWorkerPool()

#### getAcceptorPool

    public java.util.concurrent.Executor getAcceptorPool()

Specified by:
  `getAcceptorPool` in class `VertxInternal`

#### getOrAssignContext

    public Context getOrAssignContext()

Specified by:
  `getOrAssignContext` in class `VertxInternal`

#### reportException

    public void reportException(java.lang.Throwable t)

Specified by:
  `reportException` in class `VertxInternal`

#### sharedHttpServers

    public java.util.Map<ServerID,DefaultHttpServer> sharedHttpServers()

Specified by:
  `sharedHttpServers` in class `VertxInternal`

#### sharedNetServers

    public java.util.Map<ServerID,DefaultNetServer> sharedNetServers()

Specified by:
  `sharedNetServers` in class `VertxInternal`

#### cancelTimer

    public boolean cancelTimer(long id)

Description copied from class: `Vertx`
Cancel the timer with the specified `id`. Returns `` true if the timer was successfully cancelled, or `false` if the timer does not exist.

Specified by:
  `cancelTimer` in class `Vertx`

#### createEventLoopContext

    public Context createEventLoopContext()