Search in sources :

Example 1 with ControlMessageResponseDecoder

use of io.zeebe.protocol.clientapi.ControlMessageResponseDecoder in project zeebe by zeebe-io.

the class BufferingServerOutput method getAsControlMessageData.

public Map<String, Object> getAsControlMessageData(int index) {
    final ControlMessageResponseDecoder decoder = getAs(index, new ControlMessageResponseDecoder());
    final UnsafeBuffer dataBuf = new UnsafeBuffer(new byte[decoder.dataLength()]);
    decoder.getData(dataBuf, 0, dataBuf.capacity());
    return msgPackDecoder.readMsgPack(new DirectBufferInputStream(dataBuf));
}
Also used : DirectBufferInputStream(org.agrona.io.DirectBufferInputStream) ControlMessageResponseDecoder(io.zeebe.protocol.clientapi.ControlMessageResponseDecoder) UnsafeBuffer(org.agrona.concurrent.UnsafeBuffer)

Aggregations

ControlMessageResponseDecoder (io.zeebe.protocol.clientapi.ControlMessageResponseDecoder)1 UnsafeBuffer (org.agrona.concurrent.UnsafeBuffer)1 DirectBufferInputStream (org.agrona.io.DirectBufferInputStream)1