public class EventSerializer extends Object
| Constructor and Description |
|---|
EventSerializer() |
| Modifier and Type | Method and Description |
|---|---|
static AbstractEvent |
fromBuffer(Buffer buffer,
ClassLoader classLoader) |
static AbstractEvent |
fromSerializedEvent(ByteBuffer buffer,
ClassLoader classLoader) |
static boolean |
isEvent(Buffer buffer,
Class<?> eventClass)
Identifies whether the given buffer encodes the given event.
|
static Buffer |
toBuffer(AbstractEvent event) |
static BufferConsumer |
toBufferConsumer(AbstractEvent event) |
static ByteBuffer |
toSerializedEvent(AbstractEvent event) |
public static ByteBuffer toSerializedEvent(AbstractEvent event) throws IOException
IOExceptionpublic static AbstractEvent fromSerializedEvent(ByteBuffer buffer, ClassLoader classLoader) throws IOException
IOExceptionpublic static Buffer toBuffer(AbstractEvent event) throws IOException
IOExceptionpublic static BufferConsumer toBufferConsumer(AbstractEvent event) throws IOException
IOExceptionpublic static AbstractEvent fromBuffer(Buffer buffer, ClassLoader classLoader) throws IOException
IOExceptionpublic static boolean isEvent(Buffer buffer, Class<?> eventClass) throws IOException
buffer - the buffer to peak intoeventClass - the expected class of the event typeIOExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.