public class MessageInterfaceBinding extends Object implements InterfaceBinding<MessageInterface>
MessageInterface
into a JSON stream.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_MESSAGE_LENGTH
Default maximum length for a message.
|
Constructor and Description |
---|
MessageInterfaceBinding()
Create instance of MessageInterfaceBinding with default message length.
|
MessageInterfaceBinding(int maxMessageLength)
Create instance of MessageInterfaceBinding with provided the maximum length of the messages.
|
Modifier and Type | Method and Description |
---|---|
void |
writeInterface(com.fasterxml.jackson.core.JsonGenerator generator,
MessageInterface messageInterface)
Encodes the content of a sentry interface into a JSON stream.
|
public static final int DEFAULT_MAX_MESSAGE_LENGTH
public MessageInterfaceBinding()
public MessageInterfaceBinding(int maxMessageLength)
maxMessageLength
- the maximum message lengthpublic void writeInterface(com.fasterxml.jackson.core.JsonGenerator generator, MessageInterface messageInterface) throws IOException
InterfaceBinding
writeInterface
in interface InterfaceBinding<MessageInterface>
generator
- JSON generator allowing to write JSON content.messageInterface
- interface to encode.IOException
- thrown in case of failure during the generation of JSON content.Copyright © 2012–2018. All rights reserved.