Package org.kie.api.marshalling
Interface ObjectMarshallingStrategy
- 
 public interface ObjectMarshallingStrategy
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceObjectMarshallingStrategy.Context
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanaccept(java.lang.Object object)ObjectMarshallingStrategy.ContextcreateContext()Creates a new marshalling contextdefault java.lang.StringgetName()Override this method if you want multiple marshalling strategies of the same implementation in environmentbyte[]marshal(ObjectMarshallingStrategy.Context context, java.io.ObjectOutputStream os, java.lang.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[].java.lang.Objectread(java.io.ObjectInputStream os)java.lang.Objectunmarshal(ObjectMarshallingStrategy.Context context, java.io.ObjectInputStream is, byte[] object, java.lang.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[]voidwrite(java.io.ObjectOutputStream os, java.lang.Object object)
 
- 
- 
- 
Method Detail- 
getNamedefault java.lang.String getName() Override this method if you want multiple marshalling strategies of the same implementation in environment- Returns:
- the unique name in runtime environment of the ObjectMarshallingStrategy
 
 - 
acceptboolean accept(java.lang.Object object) 
 - 
writevoid write(java.io.ObjectOutputStream os, java.lang.Object object) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
readjava.lang.Object read(java.io.ObjectInputStream os) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
 - 
marshalbyte[] marshal(ObjectMarshallingStrategy.Context context, java.io.ObjectOutputStream os, java.lang.Object object) throws java.io.IOException 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[].- Parameters:
- context- the context for this strategy created by the method #createContext()
- object- the object to be marshalled
- Returns:
- the marshalled byte[] of the input object
- Throws:
- java.io.IOException
 
 - 
unmarshaljava.lang.Object unmarshal(ObjectMarshallingStrategy.Context context, java.io.ObjectInputStream is, byte[] object, java.lang.ClassLoader classloader) throws java.io.IOException, java.lang.ClassNotFoundException This method is analogous to the read method, but instead of reading it from an input stream, it reads it from a byte[]- Parameters:
- context- the context for this strategy created by the method #createContext()
- object- the marshalled object in a byte[]
- Returns:
- the unmarshalled Object
- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
 - 
createContextObjectMarshallingStrategy.Context createContext() Creates a new marshalling context
 
- 
 
-