io.vertx.serviceproxy

## Class ServiceExceptionMessageCodec

- java.lang.Object
- - io.vertx.serviceproxy.ServiceExceptionMessageCodec

- All Implemented Interfaces:
    MessageCodec<ServiceException,ServiceException>

      public class ServiceExceptionMessageCodec
      extends Object
      implements MessageCodec<ServiceException,ServiceException>

  A MessageCodec for ServiceException
  Author:
    Dan O'Reilly

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceExceptionMessageCodec()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ServiceException` | `decodeFromWire(int pos, Buffer buffer)` Called by Vert.x when a message is decoded from the wire.
    `void` | `encodeToWire(Buffer buffer, ServiceException body)` Called by Vert.x when marshalling a message to the wire.
    `String` | `name()` The codec name.
    `byte` | `systemCodecID()` Used to identify system codecs.
    `ServiceException` | `transform(ServiceException exception)` If a message is sent locally across the event bus, this method is called to transform the message from the sent type S to the received type R

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

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

- - ### Constructor Detail

    - #### ServiceExceptionMessageCodec

          public ServiceExceptionMessageCodec()

  - ### Method Detail

    - #### encodeToWire

          public void encodeToWire(Buffer buffer,
                                   ServiceException body)

      Description copied from interface: `MessageCodec`
      Called by Vert.x when marshalling a message to the wire.
      Specified by:
        `encodeToWire` in interface `MessageCodec<ServiceException,ServiceException>`
      Parameters:
        `buffer` - the message should be written into this buffer
        `body` - the message that is being sent

    - #### decodeFromWire

          public ServiceException decodeFromWire(int pos,
                                                 Buffer buffer)

      Description copied from interface: `MessageCodec`
      Called by Vert.x when a message is decoded from the wire.
      Specified by:
        `decodeFromWire` in interface `MessageCodec<ServiceException,ServiceException>`
      Parameters:
        `pos` - the position in the buffer where the message should be read from.
        `buffer` - the buffer to read the message from
      Returns:
        the read message

    - #### transform

          public ServiceException transform(ServiceException exception)

      Description copied from interface: `MessageCodec`
      If a message is sent locally across the event bus, this method is called to transform the message from the sent type S to the received type R
      Specified by:
        `transform` in interface `MessageCodec<ServiceException,ServiceException>`
      Parameters:
        `exception` - the sent message
      Returns:
        the transformed message

    - #### name

          public String name()

      Description copied from interface: `MessageCodec`
      The codec name. Each codec must have a unique name. This is used to identify a codec when sending a message and for unregistering codecs.
      Specified by:
        `name` in interface `MessageCodec<ServiceException,ServiceException>`
      Returns:
        the name

    - #### systemCodecID

          public byte systemCodecID()

      Description copied from interface: `MessageCodec`
      Used to identify system codecs. Should always return -1 for a user codec.
      Specified by:
        `systemCodecID` in interface `MessageCodec<ServiceException,ServiceException>`
      Returns:
        -1 for a user codec.

Copyright © 2016. All rights reserved.