Class ProtobufMarshaller
- java.lang.Object
-
- org.drools.serialization.protobuf.ProtobufMarshaller
-
- All Implemented Interfaces:
org.drools.core.marshalling.impl.InternalMarshaller,org.kie.api.marshalling.Marshaller
public class ProtobufMarshaller extends Object implements org.drools.core.marshalling.impl.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 org.drools.core.marshalling.impl.KieSessionInitializerinitializerprotected org.kie.api.KieBasekbaseprotected org.kie.api.marshalling.MarshallingConfigurationmarshallingConfigprotected org.drools.core.RuleBaseConfigurationruleBaseConfigprotected org.kie.api.marshalling.ObjectMarshallingStrategyStorestrategyStorestatic Map<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 org.drools.core.marshalling.impl.KieSessionInitializergetInitializer()org.kie.api.marshalling.MarshallingConfigurationgetMarshallingConfiguration()voidmarshall(OutputStream stream, org.kie.api.runtime.KieSession ksession)voidmarshall(OutputStream stream, org.kie.api.runtime.KieSession ksession, long clockTime)voidsetInitializer(org.drools.core.marshalling.impl.KieSessionInitializer initializer)org.kie.internal.runtime.StatefulKnowledgeSessionunmarshall(InputStream stream)voidunmarshall(InputStream stream, org.kie.api.runtime.KieSession ksession)org.kie.internal.runtime.StatefulKnowledgeSessionunmarshall(InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment)ReadSessionResultunmarshallWithMessage(InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment)
-
-
-
Field Detail
-
initializer
protected org.drools.core.marshalling.impl.KieSessionInitializer initializer
-
TIMER_READERS
public static final Map<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 org.drools.core.marshalling.impl.KieSessionInitializer getInitializer()
- Specified by:
getInitializerin interfaceorg.drools.core.marshalling.impl.InternalMarshaller
-
setInitializer
public void setInitializer(org.drools.core.marshalling.impl.KieSessionInitializer initializer)
- Specified by:
setInitializerin interfaceorg.drools.core.marshalling.impl.InternalMarshaller
-
unmarshall
public org.kie.internal.runtime.StatefulKnowledgeSession unmarshall(InputStream stream) throws IOException, ClassNotFoundException
- Specified by:
unmarshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
IOExceptionClassNotFoundException
-
unmarshall
public org.kie.internal.runtime.StatefulKnowledgeSession unmarshall(InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment) throws IOException, ClassNotFoundException
- Specified by:
unmarshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
IOExceptionClassNotFoundException
-
unmarshall
public void unmarshall(InputStream stream, org.kie.api.runtime.KieSession ksession) throws IOException, ClassNotFoundException
- Specified by:
unmarshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
IOExceptionClassNotFoundException
-
marshall
public void marshall(OutputStream stream, org.kie.api.runtime.KieSession ksession) throws IOException
- Specified by:
marshallin interfaceorg.kie.api.marshalling.Marshaller- Throws:
IOException
-
marshall
public void marshall(OutputStream stream, org.kie.api.runtime.KieSession ksession, long clockTime) throws IOException
- Throws:
IOException
-
getMarshallingConfiguration
public org.kie.api.marshalling.MarshallingConfiguration getMarshallingConfiguration()
- Specified by:
getMarshallingConfigurationin interfaceorg.kie.api.marshalling.Marshaller
-
unmarshallWithMessage
public ReadSessionResult unmarshallWithMessage(InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
-