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
IOException
public static AbstractEvent fromSerializedEvent(ByteBuffer buffer, ClassLoader classLoader) throws IOException
IOException
public static Buffer toBuffer(AbstractEvent event) throws IOException
IOException
public static BufferConsumer toBufferConsumer(AbstractEvent event) throws IOException
IOException
public static AbstractEvent fromBuffer(Buffer buffer, ClassLoader classLoader) throws IOException
IOException
public static boolean isEvent(Buffer buffer, Class<?> eventClass) throws IOException
buffer
- the buffer to peak intoeventClass
- the expected class of the event typeIOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.