public interface ObjectMarshallingStrategy
Modifier and Type | Interface and Description |
---|---|
static interface |
ObjectMarshallingStrategy.Context |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Object object) |
ObjectMarshallingStrategy.Context |
createContext()
Creates a new marshalling context
|
default String |
getName()
Override this method if you want multiple marshalling strategies of the same implementation in environment
|
byte[] |
marshal(ObjectMarshallingStrategy.Context context,
ObjectOutputStream os,
Object object)
This method is analogous to the write() method, but instead
of writing the object into an output stream, it returns
the marshalled object as a byte[].
|
Object |
read(ObjectInputStream os) |
Object |
unmarshal(ObjectMarshallingStrategy.Context context,
ObjectInputStream is,
byte[] object,
ClassLoader classloader)
This method is analogous to the read method, but instead of reading it from an
input stream, it reads it from a byte[]
|
void |
write(ObjectOutputStream os,
Object object) |
default String getName()
boolean accept(Object object)
void write(ObjectOutputStream os, Object object) throws IOException
IOException
Object read(ObjectInputStream os) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
byte[] marshal(ObjectMarshallingStrategy.Context context, ObjectOutputStream os, Object object) throws IOException
context
- the context for this strategy created by the method #createContext()object
- the object to be marshalledIOException
Object unmarshal(ObjectMarshallingStrategy.Context context, ObjectInputStream is, byte[] object, ClassLoader classloader) throws IOException, ClassNotFoundException
context
- the context for this strategy created by the method #createContext()object
- the marshalled object in a byte[]IOException
ClassNotFoundException
ObjectMarshallingStrategy.Context createContext()
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.