Module vertx

[hide private]
[frames] | no frames]

# Module vertx

source code

This module provides the entry point to the vert.x platform

Author: Scott Horn

Classes | [hide private]

Vertx

Functions | [hide private]

create_http_server(**kwargs) Return a HttpServer | source code

create_http_client(**kwargs) Return a HttpClient | source code

create_net_server(**kwargs) Return a NetServer | source code

create_net_client(**kwargs) Return a NetClient | source code

create_sockjs_server(http_server) Return a SockJSServer | source code

get_logger() Get the logger for the verticle | source code

deploy_verticle(main, config=None, instances=1, handler=None) Deploy a verticle. | source code

deploy_worker_verticle(main, config=None, instances=1, handler=None) Deploy a worker verticle. | source code

deploy_module(module_name, config=None, instances=1, handler=None) Deploy a module. | source code

undeploy_verticle(id) Undeploy a verticle | source code

undeploy_module(id) Undeploy a module | source code

config() Get config for the verticle | source code

java_vertx() | source code

set_timer(delay, handler) Sets a one-shot timer that will fire after a certain delay. | source code

set_periodic(delay, handler) Sets a periodic timer. | source code

cancel_timer(id) Cancels a timer. | source code

run_on_loop(handler) Put the handler on the event queue for this loop so it will be run asynchronously ASAP after this event has been processed | source code

Variables | [hide private]

| __email__ = `"scott@hornmicro.com"`
| __credits__ = `"Based entirely on work by Tim Fox http://tfox.org"`

Function Details | [hide private]

### deploy_verticle(main, config=None, instances=1, handler=None)

source code

Deploy a verticle. The actual deploy happens asynchronously

Keyword arguments:

Parameters:
  - `main` - the main of the verticle to deploy
  - `config` - dict configuration for the verticle
  - `instances` - number of instances to deploy
  - `handler` - will be executed when deploy has completed

### deploy_worker_verticle(main, config=None, instances=1, handler=None)

source code

Deploy a worker verticle. The actual deploy happens asynchronously

Keyword arguments:

Parameters:
  - `main` - the main of the verticle to deploy
  - `config` - dict configuration for the verticle
  - `instances` - the number of instances to deploy
  - `handler` - handler will be executed when deploy has completed

### deploy_module(module_name, config=None, instances=1, handler=None)

source code

Deploy a module. The actual deploy happens asynchronously

Keyword arguments:

Parameters:
  - `module_name` - The name of the module to deploy
  - `config` - dict configuration for the module
  - `instances` - Number of instances to deploy
  - `handler` - handler will be executed when deploy has completed

### undeploy_verticle(id)

source code

Undeploy a verticle

Keyword arguments:

Parameters:
  - `id` - the unique id of the deployment

### undeploy_module(id)

source code

Undeploy a module

Keyword arguments:

Parameters:
  - `id` - the unique id of the module

### config()

source code

Get config for the verticle

Returns:
  dict config for the verticle

### set_timer(delay, handler)

source code

Sets a one-shot timer that will fire after a certain delay. This method will accept either a Proc or a block.

Keyword arguments:

Parameters:
  - `delay` - the delay, in milliseconds
  - `handler` - a block representing the code that will be run after the delay the unique id of the timer

### set_periodic(delay, handler)

source code

Sets a periodic timer.

Keyword arguments:

Parameters:
  - `delay` - the period of the timer, in milliseconds
  - `handler` - a block representing the code that will be when the timer fires the unique id of the timer

### cancel_timer(id)

source code

Cancels a timer.

Keyword arguments:

Parameters:
  - `id` - the id of the timer, as returned from set_timer or set_periodic
Returns:
  true if the timer was cancelled, false if it wasn't found.

### run_on_loop(handler)

source code

Put the handler on the event queue for this loop so it will be run asynchronously ASAP after this event has been processed

Keyword arguments:

Parameters:
  - `handler` - a block representing the code that will be run ASAP