public class BinaryMethodWriterInvocationHandler extends AbstractMethodWriterInvocationHandler
MethodWriterInvocationHandler that serialises method calls to a
MarshallableOut using the binary wire format.
Each call is wrapped in a WriteDocumentContext which is opened and
closed by this handler. Calls may be written as data or metadata documents
depending on the metaData flag.
genericEvent, recordHistory| Constructor and Description |
|---|
BinaryMethodWriterInvocationHandler(Class<?> tClass,
boolean metaData,
Supplier<MarshallableOut> marshallableOutSupplier)
Create a handler using the given class, metadata flag and a supplier of MarshallableOut.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doInvoke(Object proxy,
Method method,
Object[] args)
Intercepts calls on the proxy.
|
protected void |
handleInvoke(Method method,
Object[] args)
Serialises the given
method call with args to the configured output. |
boolean |
metaData()
Gets the current metadata setting for this handler.
|
genericEvent, handleInvoke, recordHistory, useMethodIdsinvoke, onCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokepublic BinaryMethodWriterInvocationHandler(Class<?> tClass, boolean metaData, Supplier<MarshallableOut> marshallableOutSupplier)
tClass - primary interface of the proxymetaData - Flag to determine if metadata is to be written.marshallableOutSupplier - supplier of the destination for serialised callsprotected Object doInvoke(Object proxy, Method method, Object[] args)
writingDocument() is handled here
to expose the underlying WriteDocumentContext directly.
Other calls are delegated to AbstractMethodWriterInvocationHandler.doInvoke(Object, Method, Object[]).doInvoke in class AbstractMethodWriterInvocationHandlerpublic boolean metaData()
true if metadata is enabled, false otherwise.protected void handleInvoke(Method method, Object[] args)
method call with args to the configured output.
Each invocation acquires a new WriteDocumentContext which is marked
to possibly hold metadata according to metaData.
If the return type of the method is an interface the document context is marked as
chained so subsequent calls may share the same context.handleInvoke in class AbstractMethodWriterInvocationHandlermethod - The method being invoked.args - Arguments provided for the method invocation.Copyright © 2026 Chronicle Software Ltd. All rights reserved.