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,
ClassLoader classLoader)
Identifies whether the given buffer encodes the given event.
|
static Buffer |
toBuffer(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 AbstractEvent fromBuffer(Buffer buffer, ClassLoader classLoader) throws IOException
IOExceptionpublic static boolean isEvent(Buffer buffer, Class<?> eventClass, ClassLoader classLoader) throws IOException
buffer - the buffer to peak intoeventClass - the expected class of the event typeclassLoader - the class loader to use for custom event classesIOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.