|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbpm.marshalling.impl.ProcessInstanceResolverStrategy
public class ProcessInstanceResolverStrategy
When using this strategy, knowledge session de/marshalling process will make sure that the processInstance is not serialized as a part of the the session/network.
Instead, this strategy, which may only be used forProcessInstance objects,
saves the process instance in the ProcessInstanceManager, and later retrieves
it from there.
If you're doing tricky things with serialization and persistence, please make sure
to remember that the ProcessInstanceManager cache of process instances is emptied
at the end of every transaction (commit).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.drools.marshalling.ObjectMarshallingStrategy |
|---|
ObjectMarshallingStrategy.Context |
| Constructor Summary | |
|---|---|
ProcessInstanceResolverStrategy()
|
|
| Method Summary | |
|---|---|
boolean |
accept(Object object)
|
ObjectMarshallingStrategy.Context |
createContext()
Creates a new marshalling context |
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 is)
|
static org.drools.common.InternalKnowledgeRuntime |
retrieveKnowledgeRuntime(Object streamContext)
Retrieve the ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream. |
static ProcessInstanceManager |
retrieveProcessInstanceManager(Object streamContext)
Retrieve the ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream. |
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessInstanceResolverStrategy()
| Method Detail |
|---|
public boolean accept(Object object)
accept in interface ObjectMarshallingStrategy
public void write(ObjectOutputStream os,
Object object)
throws IOException
write in interface ObjectMarshallingStrategyIOException
public Object read(ObjectInputStream is)
throws IOException,
ClassNotFoundException
read in interface ObjectMarshallingStrategyIOException
ClassNotFoundExceptionpublic static ProcessInstanceManager retrieveProcessInstanceManager(Object streamContext)
ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream.
The stream object will secretly also either be a MarshallerReaderContext or a
MarshallerWriteContext.
streamContext - The marshaller stream/context.
ProcessInstanceManager object.public static org.drools.common.InternalKnowledgeRuntime retrieveKnowledgeRuntime(Object streamContext)
ProcessInstanceManager object from the ObjectOutput- or ObjectInputStream.
The stream object will secretly also either be a MarshallerReaderContext or a
MarshallerWriteContext.
The knowledge runtime object is useful in order to reconnect the process instance to the
process and the knowledge runtime object.
streamContext - The marshaller stream/context.
InternalKnowledgeRuntime object.
public byte[] marshal(ObjectMarshallingStrategy.Context context,
ObjectOutputStream os,
Object object)
throws IOException
ObjectMarshallingStrategy
marshal in interface ObjectMarshallingStrategyobject - the object to be marshalled
IOException
public Object unmarshal(ObjectMarshallingStrategy.Context context,
ObjectInputStream is,
byte[] object,
ClassLoader classloader)
throws IOException,
ClassNotFoundException
ObjectMarshallingStrategy
unmarshal in interface ObjectMarshallingStrategyobject - the marshalled object in a byte[]
IOException
ClassNotFoundExceptionpublic ObjectMarshallingStrategy.Context createContext()
ObjectMarshallingStrategy
createContext in interface ObjectMarshallingStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||