public abstract class AbstractGeneratedMethodReader extends Object implements net.openhft.chronicle.bytes.MethodReader
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
dataEventProcessed |
protected WireParselet |
debugLoggingParselet |
protected MessageHistory |
messageHistory |
static ThreadLocal<String> |
SERVICE_NAME |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGeneratedMethodReader(MarshallableIn in,
WireParselet debugLoggingParselet)
Constructs a new AbstractGeneratedMethodReader with the provided input interface
and a debug logging parselet.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
actualInvoke(Method method,
Object o,
Object[] objects)
Invokes a given method on the provided object with the specified arguments.
|
protected <T> T |
checkRecycle(T o)
Offers a workaround to selectively disable "object recycling read" provided by
ValueIn.object(Object, Class)
for specific object types. |
void |
close() |
net.openhft.chronicle.bytes.MethodReader |
closeIn(boolean closeIn) |
void |
historyConsumer(Consumer<MessageHistory> historyConsumer)
Sets a consumer for processing message history.
|
boolean |
isClosed() |
protected static Method |
lookupMethod(Class<?> clazz,
String name,
Class<?>... parameterTypes)
A utility method that assists implementations in retrieving a method from a class.
|
net.openhft.chronicle.bytes.MethodReaderInterceptorReturns |
methodReaderInterceptorReturns() |
AbstractGeneratedMethodReader |
predicate(Predicate<net.openhft.chronicle.bytes.MethodReader> predicate)
Sets a predicate to be used by the method reader.
|
boolean |
readOne() |
MethodReaderStatus |
readOne0(DocumentContext context)
Reads the content based on the provided document context.
|
protected abstract MethodReaderStatus |
readOneGenerated(WireIn wireIn)
Reads call name and arguments from the wire and performs invocation on a target object instance.
|
protected abstract MethodReaderStatus |
readOneMetaGenerated(WireIn wireIn) |
protected boolean |
restIgnored()
Determines if the rest of the wire data should be ignored.
|
void |
scanning(boolean scanning)
Sets the scanning state.
|
void |
throwExceptionIfClosed()
Checks if the method reader instance has been closed and throws a
ClosedIllegalStateException if it is. |
public static final ThreadLocal<String> SERVICE_NAME
protected final WireParselet debugLoggingParselet
protected MessageHistory messageHistory
protected boolean dataEventProcessed
protected AbstractGeneratedMethodReader(MarshallableIn in, WireParselet debugLoggingParselet)
in - The input interface for marshallable datadebugLoggingParselet - The parselet used for debugging and loggingpublic AbstractGeneratedMethodReader predicate(Predicate<net.openhft.chronicle.bytes.MethodReader> predicate)
predicate - The predicate for filteringprotected static Method lookupMethod(Class<?> clazz, String name, Class<?>... parameterTypes)
clazz - The class containing the methodname - The name of the methodparameterTypes - The parameter types of the methodpublic void historyConsumer(Consumer<MessageHistory> historyConsumer)
historyConsumer - The consumer for processing message historyprotected abstract MethodReaderStatus readOneGenerated(WireIn wireIn)
GenerateMethodReader.wireIn - Data input.protected abstract MethodReaderStatus readOneMetaGenerated(WireIn wireIn)
public MethodReaderStatus readOne0(DocumentContext context)
context - Reading document context.protected boolean restIgnored()
true if the rest should be ignored, false otherwise. Default implementation returns false.public boolean readOne()
readOne in interface net.openhft.chronicle.bytes.MethodReaderpublic void throwExceptionIfClosed()
throws net.openhft.chronicle.core.io.ClosedIllegalStateException
ClosedIllegalStateException if it is.
This method is intended to guard against operations on a closed instance, ensuring that no further
operations can be performed once the instance has been closed. This is particularly useful for
methods that modify the state of the instance or rely on its open state to function correctly.net.openhft.chronicle.core.io.ClosedIllegalStateException - if this instance has already been closed.public net.openhft.chronicle.bytes.MethodReaderInterceptorReturns methodReaderInterceptorReturns()
methodReaderInterceptorReturns in interface net.openhft.chronicle.bytes.MethodReaderpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic boolean isClosed()
isClosed in interface net.openhft.chronicle.core.io.QueryCloseablepublic net.openhft.chronicle.bytes.MethodReader closeIn(boolean closeIn)
closeIn in interface net.openhft.chronicle.bytes.MethodReaderprotected <T> T checkRecycle(T o)
ValueIn.object(Object, Class)
for specific object types. This ensures that certain objects, such as arrays and collections, are
not unintentionally reused or recycled during the reading process.T - The generic type of the object to check.o - The object instance to verify and possibly recycle.null if the object is either
null or an array. If the object is a collection or map, the method will clear its
content and return the object.protected Object actualInvoke(Method method, Object o, Object[] objects)
method - The method to be invoked.o - The target object on which the method is to be invoked.objects - The arguments to the method.RuntimeException - if the method invocation throws an exception.public void scanning(boolean scanning)
scanning - The desired state of scanning. True to indicate scanning, false otherwise.Copyright © 2024. All rights reserved.