Class 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
    • 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
      KieSessionInitializer getInitializer()  
      org.kie.api.marshalling.MarshallingConfiguration getMarshallingConfiguration()  
      void marshall​(java.io.OutputStream stream, org.kie.api.runtime.KieSession ksession)  
      void marshall​(java.io.OutputStream stream, org.kie.api.runtime.KieSession ksession, long clockTime)  
      void setInitializer​(KieSessionInitializer initializer)  
      org.kie.internal.runtime.StatefulKnowledgeSession unmarshall​(java.io.InputStream stream)  
      void unmarshall​(java.io.InputStream stream, org.kie.api.runtime.KieSession ksession)  
      org.kie.internal.runtime.StatefulKnowledgeSession unmarshall​(java.io.InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment)  
      ReadSessionResult unmarshallWithMessage​(java.io.InputStream stream, org.kie.api.runtime.KieSessionConfiguration config, org.kie.api.runtime.Environment environment)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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
    • Constructor Detail

      • ProtobufMarshaller

        public ProtobufMarshaller​(org.kie.api.KieBase kbase,
                                  org.kie.api.marshalling.MarshallingConfiguration marshallingConfig)
    • Method Detail

      • unmarshall

        public org.kie.internal.runtime.StatefulKnowledgeSession unmarshall​(java.io.InputStream stream)
                                                                     throws java.io.IOException,
                                                                            java.lang.ClassNotFoundException
        Specified by:
        unmarshall in interface org.kie.api.marshalling.Marshaller
        Throws:
        java.io.IOException
        java.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:
        unmarshall in interface org.kie.api.marshalling.Marshaller
        Throws:
        java.io.IOException
        java.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:
        unmarshall in interface org.kie.api.marshalling.Marshaller
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • marshall

        public void marshall​(java.io.OutputStream stream,
                             org.kie.api.runtime.KieSession ksession)
                      throws java.io.IOException
        Specified by:
        marshall in interface org.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:
        getMarshallingConfiguration in interface org.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.IOException
        java.lang.ClassNotFoundException