Examples of MarshallerWriteContext


Examples of org.drools.core.marshalling.impl.MarshallerWriteContext



        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            MarshallerWriteContext context = new MarshallerWriteContext( baos,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         this.env);
            ProtobufOutputMarshaller.writeWorkItem(context, workItem);

            context.close();
            this.workItemByteArray = baos.toByteArray();
        } catch ( IOException e ) {
            throw new IllegalArgumentException( "IOException while storing workItem " + workItem.getId() + ": " + e.getMessage() );
        }
    }
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

    @PreUpdate
    public void update() {
        this.state = workItem.getState();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            MarshallerWriteContext context = new MarshallerWriteContext( baos,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         this.env);
           
            OutputMarshaller.writeWorkItem( context,
                                                 workItem );

            context.close();
            this.workItemByteArray = baos.toByteArray();
        } catch ( IOException e ) {
            throw new IllegalArgumentException( "IOException while storing workItem " + workItem.getId() + ": " + e.getMessage() );
        }
    }
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

        ObjectMarshallingStrategy[] strats
            = new ObjectMarshallingStrategy[] { MarshallerFactory.newSerializeMarshallingStrategy() };

        // marshall/serialize workItem
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
        OutputMarshaller.writeWorkItem(outContext, workItem);
       
        // unmarshall/deserialize workItem
        byte [] byteArray = baos.toByteArray();
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OutputMarshaller.writeWorkItem(outContext, workItem);
            byteArray = baos.toByteArray();
        }
      
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OutputMarshaller.writeWorkItem(outContext, workItem);
            byteArray = baos.toByteArray();
        }
   
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OutputMarshaller.writeWorkItem(outContext, workItem);
            byteArray = baos.toByteArray();
        }
   
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OldOutputMarshallerMethods.writeWorkItem_v1(outContext, workItem);
            byteArray = baos.toByteArray();
        }
       
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OldOutputMarshallerMethods.writeFactHandle_v1(outContext, (ObjectOutputStream) outContext,
                    outContext.objectMarshallingStrategyStore, 2, factHandle);
            outContext.close();
            byteArray = baos.toByteArray();
        }
       
        // unmarshall/deserialize workItem
        InternalFactHandle newFactHandle;
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OldOutputMarshallerMethods.writeFactHandle_v1(outContext, (ObjectOutputStream) outContext,
                    outContext.objectMarshallingStrategyStore, 2, factHandle);
            outContext.close();
            byteArray = baos.toByteArray();
        }
       
        // unmarshall/deserialize workItem
        InternalFactHandle newFactHandle;
View Full Code Here

Examples of org.drools.core.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OldOutputMarshallerMethods.writeFactHandle_v1(outContext, (ObjectOutputStream) outContext,
                    outContext.objectMarshallingStrategyStore, 2, factHandle);
            outContext.close();
            byteArray = baos.toByteArray();
        }
       
        // unmarshall/deserialize workItem
        InternalFactHandle newFactHandle;
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.