org.vertx.java.core.eventbus.impl

## Class DefaultEventBus

- java.lang.Object
- - org.vertx.java.core.eventbus.impl.DefaultEventBus

All Implemented Interfaces:
  EventBus

    public class DefaultEventBus
    extends java.lang.Object
    implements EventBus

### Field Summary

Fields
`static int` `DEFAULT_CLUSTER_PORT`

### Constructor Summary

Constructors
Constructor and Description
`DefaultEventBus(VertxInternal vertx)`
`DefaultEventBus(VertxInternal vertx, int port, java.lang.String hostname)`
`DefaultEventBus(VertxInternal vertx, java.lang.String hostname)`

### Method Summary

Methods
`void` `close(Handler<java.lang.Void> doneHandler)`
`void` `publish(java.lang.String address, java.lang.Boolean message)` Publish a Boolean as a message
`void` `publish(java.lang.String address, Buffer message)` Publish a Buffer as a message
`void` `publish(java.lang.String address, java.lang.Byte message)` Publish a Byte as a message
`void` `publish(java.lang.String address, byte[] message)` Publish a byte[] as a message
`void` `publish(java.lang.String address, java.lang.Character message)` Publish a Character as a message
`void` `publish(java.lang.String address, java.lang.Double message)` Publish a Double as a message
`void` `publish(java.lang.String address, java.lang.Float message)` Publish a Float as a message
`void` `publish(java.lang.String address, java.lang.Integer message)` Publish an Integer as a message
`void` `publish(java.lang.String address, JsonArray message)` Publish a JSON array as a message
`void` `publish(java.lang.String address, JsonObject message)` Publish a JSON object as a message
`void` `publish(java.lang.String address, java.lang.Long message)` Publish a Long as a message
`void` `publish(java.lang.String address, java.lang.Short message)` Publish a Short as a message
`void` `publish(java.lang.String address, java.lang.String message)` Publish a String as a message
`java.lang.String` `registerHandler(Handler<? extends Message> handler)` Registers a handler against a uniquely generated address, the address is returned as the id
`java.lang.String` `registerHandler(Handler<? extends Message> handler, AsyncResultHandler<java.lang.Void> completionHandler)` Registers a handler against a uniquely generated address, the address is returned as the id
`java.lang.String` `registerHandler(java.lang.String address, Handler<? extends Message> handler)` Registers a handler against the specified address
`java.lang.String` `registerHandler(java.lang.String address, Handler<? extends Message> handler, AsyncResultHandler<java.lang.Void> completionHandler)` Registers a handler against the specified address
`java.lang.String` `registerLocalHandler(Handler<? extends Message> handler)` Registers a local handler against a uniquely generated address, the address is returned as the id
`java.lang.String` `registerLocalHandler(java.lang.String address, Handler<? extends Message> handler)` Registers a local handler against the specified address.
`void` `send(java.lang.String address, java.lang.Boolean message)` Send a Boolean as a message
`void` `send(java.lang.String address, java.lang.Boolean message, Handler<Message<java.lang.Boolean>> replyHandler)` Send a Boolean as a message
`void` `send(java.lang.String address, Buffer message)` Send a Buffer as a message
`void` `send(java.lang.String address, Buffer message, Handler<Message<Buffer>> replyHandler)` Send a Buffer as a message
`void` `send(java.lang.String address, java.lang.Byte message)` Send a Byte as a message
`void` `send(java.lang.String address, byte[] message)` Send a byte[] as a message
`void` `send(java.lang.String address, byte[] message, Handler<Message<byte[]>> replyHandler)` Send a byte[] as a message
`void` `send(java.lang.String address, java.lang.Byte message, Handler<Message<java.lang.Byte>> replyHandler)` Send a Byte as a message
`void` `send(java.lang.String address, java.lang.Character message)` Send a Character as a message
`void` `send(java.lang.String address, java.lang.Character message, Handler<Message<java.lang.Character>> replyHandler)` Send a Character as a message
`void` `send(java.lang.String address, java.lang.Double message)` Send a Double as a message
`void` `send(java.lang.String address, java.lang.Double message, Handler<Message<java.lang.Double>> replyHandler)` Send a Double as a message
`void` `send(java.lang.String address, java.lang.Float message)` Send a Float as a message
`void` `send(java.lang.String address, java.lang.Float message, Handler<Message<java.lang.Float>> replyHandler)` Send a Float as a message
`void` `send(java.lang.String address, java.lang.Integer message)` Send an Integer as a message
`void` `send(java.lang.String address, java.lang.Integer message, Handler<Message<java.lang.Integer>> replyHandler)` Send an Integer as a message
`void` `send(java.lang.String address, JsonArray message)` Send a JSON array as a message
`void` `send(java.lang.String address, JsonArray message, Handler<Message<JsonArray>> replyHandler)` Send a JSON array as a message
`void` `send(java.lang.String address, JsonObject message)` Send a JSON object as a message
`void` `send(java.lang.String address, JsonObject message, Handler<Message<JsonObject>> replyHandler)` Send a JSON object as a message
`void` `send(java.lang.String address, java.lang.Long message)` Send a Long as a message
`void` `send(java.lang.String address, java.lang.Long message, Handler<Message<java.lang.Long>> replyHandler)` Send a Long as a message
`void` `send(java.lang.String address, java.lang.Short message)` Send a Short as a message
`void` `send(java.lang.String address, java.lang.Short message, Handler<Message<java.lang.Short>> replyHandler)` Send a Short as a message
`void` `send(java.lang.String address, java.lang.String message)` Send a String as a message
`void` `send(java.lang.String address, java.lang.String message, Handler<Message<java.lang.String>> replyHandler)` Send a String as a message
`void` `unregisterHandler(java.lang.String id)` Unregister a handler given the unique handler id
`void` `unregisterHandler(java.lang.String id, AsyncResultHandler<java.lang.Void> completionHandler)` Unregister a handler given the unique handler id
`void` `unregisterHandler(java.lang.String address, Handler<? extends Message> handler)` Unregisters a handler given the address and the handler
`void` `unregisterHandler(java.lang.String address, Handler<? extends Message> handler, AsyncResultHandler<java.lang.Void> completionHandler)` Unregisters a handler given the address and the handler

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

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

### Field Detail

#### DEFAULT_CLUSTER_PORT

    public static final int DEFAULT_CLUSTER_PORT

See Also:
  Constant Field Values

### Constructor Detail

#### DefaultEventBus

    public DefaultEventBus(VertxInternal vertx)

#### DefaultEventBus

    public DefaultEventBus(VertxInternal vertx,
                   java.lang.String hostname)

#### DefaultEventBus

    public DefaultEventBus(VertxInternal vertx,
                   int port,
                   java.lang.String hostname)

### Method Detail

#### send

    public void send(java.lang.String address,
            JsonObject message,
            Handler<Message<JsonObject>> replyHandler)

Description copied from interface: `EventBus`
Send a JSON object as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            JsonObject message)

Description copied from interface: `EventBus`
Send a JSON object as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            JsonArray message,
            Handler<Message<JsonArray>> replyHandler)

Description copied from interface: `EventBus`
Send a JSON array as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            JsonArray message)

Description copied from interface: `EventBus`
Send a JSON array as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            Buffer message,
            Handler<Message<Buffer>> replyHandler)

Description copied from interface: `EventBus`
Send a Buffer as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            Buffer message)

Description copied from interface: `EventBus`
Send a Buffer as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            byte[] message,
            Handler<Message<byte[]>> replyHandler)

Description copied from interface: `EventBus`
Send a byte[] as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            byte[] message)

Description copied from interface: `EventBus`
Send a byte[] as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.String message,
            Handler<Message<java.lang.String>> replyHandler)

Description copied from interface: `EventBus`
Send a String as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.String message)

Description copied from interface: `EventBus`
Send a String as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Integer message,
            Handler<Message<java.lang.Integer>> replyHandler)

Description copied from interface: `EventBus`
Send an Integer as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Integer message)

Description copied from interface: `EventBus`
Send an Integer as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Long message,
            Handler<Message<java.lang.Long>> replyHandler)

Description copied from interface: `EventBus`
Send a Long as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Long message)

Description copied from interface: `EventBus`
Send a Long as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Float message,
            Handler<Message<java.lang.Float>> replyHandler)

Description copied from interface: `EventBus`
Send a Float as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Float message)

Description copied from interface: `EventBus`
Send a Float as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Double message,
            Handler<Message<java.lang.Double>> replyHandler)

Description copied from interface: `EventBus`
Send a Double as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Double message)

Description copied from interface: `EventBus`
Send a Double as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Boolean message,
            Handler<Message<java.lang.Boolean>> replyHandler)

Description copied from interface: `EventBus`
Send a Boolean as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Boolean message)

Description copied from interface: `EventBus`
Send a Boolean as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Short message,
            Handler<Message<java.lang.Short>> replyHandler)

Description copied from interface: `EventBus`
Send a Short as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Short message)

Description copied from interface: `EventBus`
Send a Short as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Character message,
            Handler<Message<java.lang.Character>> replyHandler)

Description copied from interface: `EventBus`
Send a Character as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Character message)

Description copied from interface: `EventBus`
Send a Character as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### send

    public void send(java.lang.String address,
            java.lang.Byte message,
            Handler<Message<java.lang.Byte>> replyHandler)

Description copied from interface: `EventBus`
Send a Byte as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message
  `replyHandler` - Reply handler will be called when any reply from the recipient is received

#### send

    public void send(java.lang.String address,
            java.lang.Byte message)

Description copied from interface: `EventBus`
Send a Byte as a message

Specified by:
  `send` in interface `EventBus`
Parameters:
  `address` - The address to send it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               JsonObject message)

Description copied from interface: `EventBus`
Publish a JSON object as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               JsonArray message)

Description copied from interface: `EventBus`
Publish a JSON array as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               Buffer message)

Description copied from interface: `EventBus`
Publish a Buffer as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               byte[] message)

Description copied from interface: `EventBus`
Publish a byte[] as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.String message)

Description copied from interface: `EventBus`
Publish a String as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Integer message)

Description copied from interface: `EventBus`
Publish an Integer as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Long message)

Description copied from interface: `EventBus`
Publish a Long as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Float message)

Description copied from interface: `EventBus`
Publish a Float as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Double message)

Description copied from interface: `EventBus`
Publish a Double as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Boolean message)

Description copied from interface: `EventBus`
Publish a Boolean as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Short message)

Description copied from interface: `EventBus`
Publish a Short as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Character message)

Description copied from interface: `EventBus`
Publish a Character as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### publish

    public void publish(java.lang.String address,
               java.lang.Byte message)

Description copied from interface: `EventBus`
Publish a Byte as a message

Specified by:
  `publish` in interface `EventBus`
Parameters:
  `address` - The address to publish it to
  `message` - The message

#### unregisterHandler

    public void unregisterHandler(java.lang.String address,
                         Handler<? extends Message> handler,
                         AsyncResultHandler<java.lang.Void> completionHandler)

Description copied from interface: `EventBus`
Unregisters a handler given the address and the handler

Specified by:
  `unregisterHandler` in interface `EventBus`
Parameters:
  `address` - The address the handler was registered at
  `handler` - The handler
  `completionHandler` - Optional completion handler. If specified, when the unregister has been propagated to all nodes of the event bus, the handler will be called.

#### unregisterHandler

    public void unregisterHandler(java.lang.String address,
                         Handler<? extends Message> handler)

Description copied from interface: `EventBus`
Unregisters a handler given the address and the handler

Specified by:
  `unregisterHandler` in interface `EventBus`
Parameters:
  `address` - The address the handler was registered at
  `handler` - The handler

#### unregisterHandler

    public void unregisterHandler(java.lang.String id)

Description copied from interface: `EventBus`
Unregister a handler given the unique handler id

Specified by:
  `unregisterHandler` in interface `EventBus`
Parameters:
  `id` - The handler id

#### unregisterHandler

    public void unregisterHandler(java.lang.String id,
                         AsyncResultHandler<java.lang.Void> completionHandler)

Description copied from interface: `EventBus`
Unregister a handler given the unique handler id

Specified by:
  `unregisterHandler` in interface `EventBus`
Parameters:
  `id` - The handler id
  `completionHandler` - Optional completion handler. If specified, when the unregister has been propagated to all nodes of the event bus, the handler will be called.

#### registerHandler

    public java.lang.String registerHandler(Handler<? extends Message> handler)

Description copied from interface: `EventBus`
Registers a handler against a uniquely generated address, the address is returned as the id

Specified by:
  `registerHandler` in interface `EventBus`
Parameters:
  `handler` - The handler
Returns:
  The unique id

#### registerHandler

    public java.lang.String registerHandler(Handler<? extends Message> handler,
                                   AsyncResultHandler<java.lang.Void> completionHandler)

Description copied from interface: `EventBus`
Registers a handler against a uniquely generated address, the address is returned as the id

Specified by:
  `registerHandler` in interface `EventBus`
  `completionHandler` - Optional result handler. If specified, when the register has been propagated to all nodes of the event bus, the handler will be called.
Returns:
  The unique id

#### registerHandler

    public java.lang.String registerHandler(java.lang.String address,
                                   Handler<? extends Message> handler,
                                   AsyncResultHandler<java.lang.Void> completionHandler)

Description copied from interface: `EventBus`
Registers a handler against the specified address

Specified by:
  `registerHandler` in interface `EventBus`
Parameters:
  `address` - The address to register it at
  `handler` - The handler
  `completionHandler` - Optional completion handler. If specified, when the register has been propagated to all nodes of the event bus, the handler will be called.
Returns:
  The unique id

#### registerHandler

    public java.lang.String registerHandler(java.lang.String address,
                                   Handler<? extends Message> handler)

Description copied from interface: `EventBus`
Registers a handler against the specified address

Specified by:
  `registerHandler` in interface `EventBus`
Parameters:
  `address` - The address to register it at
  `handler` - The handler
Returns:
  The unique id

#### registerLocalHandler

    public java.lang.String registerLocalHandler(java.lang.String address,
                                        Handler<? extends Message> handler)

Description copied from interface: `EventBus`
Registers a local handler against the specified address. The handler info won't be propagated across the cluster

Specified by:
  `registerLocalHandler` in interface `EventBus`
Parameters:
  `address` - The address to register it at
  `handler` - The handler
Returns:
  The unqiue id

#### registerLocalHandler

    public java.lang.String registerLocalHandler(Handler<? extends Message> handler)

Description copied from interface: `EventBus`
Registers a local handler against a uniquely generated address, the address is returned as the id

Specified by:
  `registerLocalHandler` in interface `EventBus`
Returns:
  The unique id

#### close

    public void close(Handler<java.lang.Void> doneHandler)