public class BytesMethodReader extends net.openhft.chronicle.core.io.SimpleCloseable implements MethodReader
MethodReader that reads method calls serialised in a binary
format from a BytesIn stream and dispatches them to target objects.
MethodEncoder instances, typically obtained via
MethodEncoderLookup, are used to decode arguments. This reader is not
thread-safe and extends SimpleCloseable.HISTORY, MESSAGE_HISTORY_METHOD_ID| Constructor and Description |
|---|
BytesMethodReader(BytesIn<?> in,
BytesParselet defaultParselet,
MethodEncoderLookup methodEncoderLookup,
Object[] objects) |
| Modifier and Type | Method and Description |
|---|---|
MethodReader |
closeIn(boolean closeIn)
This implementation does not currently close the underlying
BytesIn when invoked. |
MethodReaderInterceptorReturns |
methodReaderInterceptorReturns()
Interceptors for method reader returns are not supported by this
implementation.
|
boolean |
readOne()
Reads the next method call from the input stream.
|
close, isClosed, performCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, closeQuietly, closeQuietlypublic BytesMethodReader(BytesIn<?> in, BytesParselet defaultParselet, MethodEncoderLookup methodEncoderLookup, Object[] objects)
in - the BytesIn stream from which messages are
readdefaultParselet - handler for messages with unrecognised IDsmethodEncoderLookup - strategy for obtaining MethodEncoder
instancesobjects - target objects whose methods may be invokedpublic MethodReaderInterceptorReturns methodReaderInterceptorReturns()
methodReaderInterceptorReturns in interface MethodReaderUnsupportedOperationException - alwayspublic boolean readOne()
throws net.openhft.chronicle.core.util.InvocationTargetRuntimeException,
IllegalStateException,
BufferUnderflowException
defaultParselet is invoked.readOne in interface MethodReadertrue if a message was processed, false if no data
was availablenet.openhft.chronicle.core.util.InvocationTargetRuntimeException - if the target method throws an
exceptionBufferUnderflowException - if the stream ends prematurelynet.openhft.chronicle.core.io.ClosedIllegalStateException - if the BytesIn has been
releasednet.openhft.chronicle.core.io.ThreadingIllegalStateException - if accessed by multiple threads
unsafelyIllegalStateExceptionpublic MethodReader closeIn(boolean closeIn)
BytesIn when invoked. The parameter is ignored.closeIn in interface MethodReadercloseIn - ignoredCopyright © 2026 Chronicle Software Ltd. All rights reserved.