Example usage for io.vertx.core.eventbus EventBus registerCodec

List of usage examples for io.vertx.core.eventbus EventBus registerCodec

Introduction

In this page you can find the example usage for io.vertx.core.eventbus EventBus registerCodec.

Prototype

@GenIgnore(GenIgnore.PERMITTED_TYPE)
EventBus registerCodec(MessageCodec codec);

Source Link

Document

Register a message codec.

Usage

From source file:docoverride.eventbus.Examples.java

License:Open Source License

public void example10(EventBus eventBus, MessageCodec myCodec) {

    eventBus.registerCodec(myCodec);

    DeliveryOptions options = new DeliveryOptions().setCodecName(myCodec.name());

    eventBus.send("orders", new MyPOJO(), options);
}