public abstract class AbstractMethodWriterInvocationHandler
extends net.openhft.chronicle.core.util.AbstractInvocationHandler
implements net.openhft.chronicle.bytes.MethodWriterInvocationHandler
MethodWriterInvocationHandlers that provides a base implementation.
It manages the invocation by mapping methods to their respective parameter holders and writing them to wires.
This class can handle both regular and generic events and supports method IDs for binary output.| Modifier and Type | Field and Description |
|---|---|
protected String |
genericEvent
Name of the method used for generic events.
|
protected boolean |
recordHistory |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMethodWriterInvocationHandler(Class<?> tClass)
Constructor accepting the type of class the handler operates on.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doInvoke(Object proxy,
Method method,
Object[] args) |
void |
genericEvent(String genericEvent) |
protected abstract void |
handleInvoke(Method method,
Object[] args)
Abstract method to handle a method invocation with its respective arguments.
|
protected void |
handleInvoke(@NotNull Method method,
Object[] args,
Wire wire)
Handles the method invocation, writes the event details to the provided wire,
and supports optional recording of method history.
|
void |
recordHistory(boolean recordHistory) |
void |
useMethodIds(boolean useMethodIds) |
invoke, onCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokeprotected boolean recordHistory
protected String genericEvent
protected AbstractMethodWriterInvocationHandler(Class<?> tClass)
tClass - The class type this handler is designed for.protected Object doInvoke(Object proxy, Method method, Object[] args)
doInvoke in class net.openhft.chronicle.core.util.AbstractInvocationHandlerpublic void genericEvent(String genericEvent)
genericEvent in interface net.openhft.chronicle.bytes.MethodWriterInvocationHandlerprotected abstract void handleInvoke(Method method, Object[] args)
method - The method being invoked.args - Arguments provided for the method invocation.protected void handleInvoke(@NotNull
@NotNull Method method,
Object[] args,
Wire wire)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
method - The method being invoked.args - Arguments provided for the method invocation.wire - The wire output to write the event details.net.openhft.chronicle.core.io.InvalidMarshallableException - If there's an error during marshalling.public void recordHistory(boolean recordHistory)
recordHistory in interface net.openhft.chronicle.bytes.MethodWriterInvocationHandlerpublic void useMethodIds(boolean useMethodIds)
useMethodIds in interface net.openhft.chronicle.bytes.MethodWriterInvocationHandlerCopyright © 2026 Chronicle Software Ltd. All rights reserved.