Examples of marshall()


Examples of org.drools.marshalling.Marshaller.marshall()

        GlobalResolver resolver = session.getGlobalResolver();

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        StatefulKnowledgeSessionImpl ksession = new StatefulKnowledgeSessionImpl( (ReteooStatefulSession) session );
        Marshaller marshaller = MarshallerFactory.newMarshaller( ksession.getKnowledgeBase() );
        marshaller.marshall( baos,
                             ksession );
        baos.close();
        byte[] serializedRulebase = DroolsStreamUtils.streamOut( ruleBase );

        session.dispose();
View Full Code Here

Examples of org.drools.marshalling.Marshaller.marshall()

        serializedRulebase = null;

        baos = new ByteArrayOutputStream();
        ksession = new StatefulKnowledgeSessionImpl( (ReteooStatefulSession) session );
        marshaller = MarshallerFactory.newMarshaller( ksession.getKnowledgeBase() );
        marshaller.marshall( baos,
                             ksession );
        baos.close();
        serializedRulebase = DroolsStreamUtils.streamOut( ruleBase );

        session.dispose();
View Full Code Here

Examples of org.drools.marshalling.Marshaller.marshall()

        byte[] serializedSession = null;
        serializedRulebase = null;
        baos = new ByteArrayOutputStream();
        ksession = new StatefulKnowledgeSessionImpl( (ReteooStatefulSession) session );
        marshaller = MarshallerFactory.newMarshaller( ksession.getKnowledgeBase() );
        marshaller.marshall( baos,
                             ksession );
        baos.close();
        serializedRulebase = DroolsStreamUtils.streamOut( ruleBase );

        session.dispose();
View Full Code Here

Examples of org.drools.marshalling.Marshaller.marshall()

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new DroolsObjectOutputStream( baos );
        out.writeObject( bob );
        out.writeObject( knowledgeBase );
        marshaller.marshall( out,
                             session );
        out.flush();
        out.close();

        ObjectInputStream in = new DroolsObjectInputStream( new ByteArrayInputStream( baos.toByteArray() ) );
View Full Code Here

Examples of org.drools.marshalling.Marshaller.marshall()

            //ksession.fireAllRules();
            Marshaller marshaller = createSerializableMarshaller( knowledgeBase );
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream out = new DroolsObjectOutputStream( baos );
            out.writeObject( knowledgeBase );
            marshaller.marshall( out,
                                 ksession );
            out.flush();
            out.close();

            ObjectInputStream in = new DroolsObjectInputStream( new ByteArrayInputStream( baos.toByteArray() ) );
View Full Code Here

Examples of org.drools.marshalling.Marshaller.marshall()

   
    private void readWrite(KnowledgeBase knowledgeBase, StatefulKnowledgeSession ksession, KnowledgeSessionConfiguration config) {
        try {
            Marshaller marshaller = MarshallerFactory.newMarshaller(knowledgeBase);
            ByteArrayOutputStream o = new ByteArrayOutputStream();
            marshaller.marshall(o, ksession);
            ksession = marshaller.unmarshall(new ByteArrayInputStream(o.toByteArray()), config, KnowledgeBaseFactory.newEnvironment());
            ksession.fireAllRules();
            //scheduler = ksession.getSessionClock();
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.drools.marshalling.impl.DefaultMarshaller.marshall()

        // Serialize object
        final byte [] b1;
        {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            marshaller.marshall( bos,
                                 ksession,
                                 time );
            b1 = bos.toByteArray();
            bos.close();
        }
View Full Code Here

Examples of org.drools.marshalling.impl.ProtobufMarshaller.marshall()

        // Serialize object
        final byte [] b1;
        {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            marshaller.marshall( bos,
                                 ksession,
                                 time );
            b1 = bos.toByteArray();
            bos.close();
        }
View Full Code Here

Examples of org.eclipse.bpel.model.extensions.BPELActivitySerializer.marshall()

    String namespace = activity.eClass().getEPackage().getNsURI();
    QName qName = new QName(namespace, localName);
    BPELActivitySerializer serializer = extensionRegistry.getActivitySerializer(qName);
    if (serializer != null) {
      DocumentFragment fragment = document.createDocumentFragment();
        serializer.marshall(qName, activity, fragment, process, this);
      Element child = (Element)fragment.getFirstChild();
      activityElement.appendChild(child);
      // Standard attributes
      addStandardAttributes(child, activity);
      // Standard elements
View Full Code Here

Examples of org.eclipse.bpel.model.extensions.BPELExtensionSerializer.marshall()

          if (serializer != null) {
            // Deserialize the DOM element and add the new Extensibility element to the parent
            // ExtensibleElement
            DocumentFragment fragment=document.createDocumentFragment();
            try {
                serializer.marshall(ExtensibleElement.class,qname,extensibilityElement,fragment,process,extensionRegistry);
              Element child = (Element)fragment.getFirstChild();
              serviceRefElement.appendChild(child);
            } catch (WSDLException e) {
              throw new WrappedException(e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.