public interface MethodReaderBuilder
The builder provides various options to customize the creation of a MethodReader, including setting interceptors, handling unknown methods, handling metadata, and setting a predicate to control the reading of messages.
Modifier and Type | Method and Description |
---|---|
MethodReader |
build(Object... components)
Builds the MethodReader instance with the specified components.
|
default MethodReaderBuilder |
exceptionHandlerOnUnknownMethod(net.openhft.chronicle.core.onoes.ExceptionHandler exceptionHandler)
Sets the ExceptionHandler instance to use when an unknown method is encountered.
|
MethodReaderBuilder |
metaDataHandler(Object... components)
Sets the handlers for processing metadata messages.
|
MethodReaderBuilder |
methodReaderInterceptorReturns(MethodReaderInterceptorReturns methodReaderInterceptorReturns)
Sets an interceptor for method calls made through the MethodReader.
|
default MethodReaderBuilder |
predicate(Predicate<?> predicate)
Sets a predicate to be used by the readOne() method of the MethodReader.
|
default MethodReaderBuilder |
warnMissing(boolean warnMissing)
Sets the level of logging for missing methods.
|
MethodReaderBuilder methodReaderInterceptorReturns(MethodReaderInterceptorReturns methodReaderInterceptorReturns)
methodReaderInterceptorReturns
- the interceptor instancedefault MethodReaderBuilder warnMissing(boolean warnMissing)
warnMissing
- if true
, warnings will be logged for missing methods;
if false
, debug-level messages will be logged insteaddefault MethodReaderBuilder exceptionHandlerOnUnknownMethod(net.openhft.chronicle.core.onoes.ExceptionHandler exceptionHandler)
exceptionHandler
- the ExceptionHandler instanceMethodReaderBuilder metaDataHandler(Object... components)
components
- the metadata handlersMethodReader build(Object... components)
components
- the components for the MethodReaderdefault MethodReaderBuilder predicate(Predicate<?> predicate)
false
, readOne() will not read the message.
This feature can be used for flow control.predicate
- the predicate to setCopyright © 2023. All rights reserved.