org.vertx.java.busmods

## Class BusModBase

- java.lang.Object
- - org.vertx.java.deploy.Verticle
  - - org.vertx.java.busmods.BusModBase

    public abstract class BusModBase
    extends Verticle

Base helper class for Java busmods

### Field Summary

Fields
`protected JsonObject` `config`
`protected EventBus` `eb`
`protected Logger` `logger`

### Fields inherited from class org.vertx.java.deploy.Verticle

`container, vertx`

### Constructor Summary

Constructors
Constructor and Description
`BusModBase()`

### Method Summary

Methods
`protected boolean` `getMandatoryBooleanConfig(java.lang.String fieldName)`
`protected int` `getMandatoryIntConfig(java.lang.String fieldName)`
`protected long` `getMandatoryLongConfig(java.lang.String fieldName)`
`protected JsonObject` `getMandatoryObject(java.lang.String field, Message<JsonObject> message)`
`protected java.lang.String` `getMandatoryString(java.lang.String field, Message<JsonObject> message)`
`protected java.lang.String` `getMandatoryStringConfig(java.lang.String fieldName)`
`protected JsonArray` `getOptionalArrayConfig(java.lang.String fieldName, JsonArray defaultValue)`
`protected boolean` `getOptionalBooleanConfig(java.lang.String fieldName, boolean defaultValue)`
`protected int` `getOptionalIntConfig(java.lang.String fieldName, int defaultValue)`
`protected long` `getOptionalLongConfig(java.lang.String fieldName, long defaultValue)`
`protected JsonObject` `getOptionalObjectConfig(java.lang.String fieldName, JsonObject defaultValue)`
`protected java.lang.String` `getOptionalStringConfig(java.lang.String fieldName, java.lang.String defaultValue)`
`protected void` `sendError(Message<JsonObject> message, java.lang.String error)`
`protected void` `sendError(Message<JsonObject> message, java.lang.String error, java.lang.Exception e)`
`protected void` `sendOK(Message<JsonObject> message)`
`protected void` `sendOK(Message<JsonObject> message, JsonObject json)`
`protected void` `sendStatus(java.lang.String status, Message<JsonObject> message)`
`protected void` `sendStatus(java.lang.String status, Message<JsonObject> message, JsonObject json)`
`void` `start()` Start the busmod

### Methods inherited from class org.vertx.java.deploy.Verticle

`getContainer, getVertx, setContainer, setVertx, stop`

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

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

### Field Detail

#### eb

    protected EventBus eb

#### config

    protected JsonObject config

#### logger

    protected Logger logger

### Constructor Detail

#### BusModBase

    public BusModBase()

### Method Detail

#### start

    public void start()

Start the busmod

Specified by:
  `start` in class `Verticle`

#### sendOK

    protected void sendOK(Message<JsonObject> message)

#### sendStatus

    protected void sendStatus(java.lang.String status,
                  Message<JsonObject> message)

#### sendStatus

    protected void sendStatus(java.lang.String status,
                  Message<JsonObject> message,
                  JsonObject json)

#### sendOK

    protected void sendOK(Message<JsonObject> message,
              JsonObject json)

#### sendError

    protected void sendError(Message<JsonObject> message,
                 java.lang.String error)

#### sendError

    protected void sendError(Message<JsonObject> message,
                 java.lang.String error,
                 java.lang.Exception e)

#### getMandatoryString

    protected java.lang.String getMandatoryString(java.lang.String field,
                                      Message<JsonObject> message)

#### getMandatoryObject

    protected JsonObject getMandatoryObject(java.lang.String field,
                                Message<JsonObject> message)

#### getOptionalBooleanConfig

    protected boolean getOptionalBooleanConfig(java.lang.String fieldName,
                                   boolean defaultValue)

#### getOptionalStringConfig

    protected java.lang.String getOptionalStringConfig(java.lang.String fieldName,
                                           java.lang.String defaultValue)

#### getOptionalIntConfig

    protected int getOptionalIntConfig(java.lang.String fieldName,
                           int defaultValue)

#### getOptionalLongConfig

    protected long getOptionalLongConfig(java.lang.String fieldName,
                             long defaultValue)

#### getOptionalObjectConfig

    protected JsonObject getOptionalObjectConfig(java.lang.String fieldName,
                                     JsonObject defaultValue)

#### getOptionalArrayConfig

    protected JsonArray getOptionalArrayConfig(java.lang.String fieldName,
                                   JsonArray defaultValue)

#### getMandatoryBooleanConfig

    protected boolean getMandatoryBooleanConfig(java.lang.String fieldName)

#### getMandatoryStringConfig

    protected java.lang.String getMandatoryStringConfig(java.lang.String fieldName)

#### getMandatoryIntConfig

    protected int getMandatoryIntConfig(java.lang.String fieldName)

#### getMandatoryLongConfig

    protected long getMandatoryLongConfig(java.lang.String fieldName)