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 -
Method Summary
Modifier and TypeMethodDescriptiondecodeFromWire(int pos, Buffer buffer) Called by Vert.x when a message is decoded from the wire.voidencodeToWire(Buffer buffer, ServiceException body) Called by Vert.x when marshalling a message to the wire.name()The codec name.byteUsed to identify system codecs.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
-
Constructor Details
-
ServiceExceptionMessageCodec
public ServiceExceptionMessageCodec()
-
-
Method Details
-
encodeToWire
Description copied from interface:MessageCodecCalled by Vert.x when marshalling a message to the wire.- Specified by:
encodeToWirein interfaceMessageCodec<ServiceException, ServiceException>- Parameters:
buffer- the message should be written into this bufferbody- the message that is being sent
-
decodeFromWire
Description copied from interface:MessageCodecCalled by Vert.x when a message is decoded from the wire.- Specified by:
decodeFromWirein interfaceMessageCodec<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
Description copied from interface:MessageCodecIf 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:
transformin interfaceMessageCodec<ServiceException, ServiceException>- Parameters:
exception- the sent message- Returns:
- the transformed message
-
name
Description copied from interface:MessageCodecThe 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:
namein interfaceMessageCodec<ServiceException, ServiceException>- Returns:
- the name
-
systemCodecID
public byte systemCodecID()Description copied from interface:MessageCodecUsed to identify system codecs. Should always return -1 for a user codec.- Specified by:
systemCodecIDin interfaceMessageCodec<ServiceException, ServiceException>- Returns:
- -1 for a user codec.
-