Class ProtobufMarshaller
- java.lang.Object
-
- org.drools.serialization.protobuf.ProtobufMarshaller
-
- All Implemented Interfaces:
InternalMarshaller,org.kie.api.marshalling.Marshaller
public class ProtobufMarshaller extends java.lang.Object implements InternalMarshaller
A Marshaller implementation that uses ProtoBuf as the marshalling framework in order to support backward compatibility with marshalled sessions
-
-
Field Summary
Fields Modifier and Type Field Description protected KieSessionInitializerinitializerprotected org.kie.api.KieBasekbaseprotected org.kie.api.marshalling.MarshallingConfigurationmarshallingConfigprotected org.drools.core.RuleBaseConfigurationruleBaseConfigprotected org.kie.api.marshalling.ObjectMarshallingStrategyStorestrategyStorestatic java.util.Map<java.lang.Integer,TimersInputMarshaller>TIMER_READERS
-
Constructor Summary
Constructors Constructor Description ProtobufMarshaller(org.kie.api.KieBase kbase, org.kie.api.marshalling.MarshallingConfiguration marshallingConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KieSessionInitializergetInitializer()org.kie.api.marshalling.MarshallingConfigurationgetMarshallingConfiguration()voidmarshall(java.io.OutputStream stream, org.kie.api.runtime.KieSession ksession)voidmarshall(java.io.OutputStream stream, org.kie.api.runtime.KieSession ksession, long clockTime)voidsetInitializer(KieSessionInitializer initializer)org.kie.internal.runtime.StatefulKnowledgeSessionunmarshall(java.io.InputStream stream)voidunmarshall(java.io.InputStream stream, org.kie.api.runtime.KieSession ksession)org.kie.internal.runtime.StatefulKnowledgeSessionunmarshall(java.io.InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment)ReadSessionResultunmarshallWithMessage(java.io.InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment)
-
-
-
Field Detail
-
initializer
protected KieSessionInitializer initializer
-
TIMER_READERS
public static final java.util.Map<java.lang.Integer,TimersInputMarshaller> TIMER_READERS
-
kbase
protected org.kie.api.KieBase kbase
-
ruleBaseConfig
protected org.drools.core.RuleBaseConfiguration ruleBaseConfig
-
marshallingConfig
protected org.kie.api.marshalling.MarshallingConfiguration marshallingConfig
-
strategyStore
protected org.kie.api.marshalling.ObjectMarshallingStrategyStore strategyStore
-
-
Method Detail
-
getInitializer
public KieSessionInitializer getInitializer()
- Specified by:
getInitializerin interfaceInternalMarshaller
-
setInitializer
public void setInitializer(KieSessionInitializer initializer)
- Specified by:
setInitializerin interfaceInternalMarshaller
-
unmarshall
public org.kie.internal.runtime.StatefulKnowledgeSession unmarshall(java.io.InputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
unmarshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
unmarshall
public org.kie.internal.runtime.StatefulKnowledgeSession unmarshall(java.io.InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
unmarshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
unmarshall
public void unmarshall(java.io.InputStream stream, org.kie.api.runtime.KieSession ksession) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
unmarshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
marshall
public void marshall(java.io.OutputStream stream, org.kie.api.runtime.KieSession ksession) throws java.io.IOException- Specified by:
marshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
java.io.IOException
-
marshall
public void marshall(java.io.OutputStream stream, org.kie.api.runtime.KieSession ksession, long clockTime) throws java.io.IOException- Throws:
java.io.IOException
-
getMarshallingConfiguration
public org.kie.api.marshalling.MarshallingConfiguration getMarshallingConfiguration()
- Specified by:
getMarshallingConfigurationin interfaceorg.kie.api.marshalling.Marshaller
-
unmarshallWithMessage
public ReadSessionResult unmarshallWithMessage(java.io.InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-