T - the type of this marshallerV - the type of the mapped marshallerpublic class FunctionalMarshaller<T,V> extends Object implements ProtoStreamMarshaller<T>
| Constructor and Description |
|---|
FunctionalMarshaller(Class<T> targetClass,
Class<V> sourceClass,
org.wildfly.common.function.ExceptionFunction<T,V,IOException> function,
org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory) |
FunctionalMarshaller(Class<T> targetClass,
Function<ProtoStreamOperation,ProtoStreamMarshaller<V>> marshallerFactory,
org.wildfly.common.function.ExceptionFunction<T,V,IOException> function,
org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory) |
FunctionalMarshaller(Class<T> targetClass,
ProtoStreamMarshaller<V> marshaller,
org.wildfly.common.function.ExceptionFunction<T,V,IOException> function,
org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory) |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends T> |
getJavaClass()
Returns the type of object handled by this marshallable instance.
|
T |
readFrom(ProtoStreamReader reader)
Reads an object from the specified reader.
|
void |
writeTo(ProtoStreamWriter writer,
T object)
Writes the specified object to the specified writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeName, read, writepublic FunctionalMarshaller(Class<T> targetClass, Class<V> sourceClass, org.wildfly.common.function.ExceptionFunction<T,V,IOException> function, org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory)
public FunctionalMarshaller(Class<T> targetClass, ProtoStreamMarshaller<V> marshaller, org.wildfly.common.function.ExceptionFunction<T,V,IOException> function, org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory)
public FunctionalMarshaller(Class<T> targetClass, Function<ProtoStreamOperation,ProtoStreamMarshaller<V>> marshallerFactory, org.wildfly.common.function.ExceptionFunction<T,V,IOException> function, org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory)
public T readFrom(ProtoStreamReader reader) throws IOException
MarshallablereadFrom in interface Marshallable<T>reader - a ProtoStream readerIOException - if the object could not be readpublic void writeTo(ProtoStreamWriter writer, T object) throws IOException
MarshallablewriteTo in interface Marshallable<T>writer - a ProtoStream writerobject - the object to be writtenIOException - if the object could not be writtenpublic Class<? extends T> getJavaClass()
MarshallablegetJavaClass in interface org.infinispan.protostream.BaseMarshaller<T>getJavaClass in interface Marshallable<T>Copyright © 2022 JBoss by Red Hat. All rights reserved.