Package java.io

Examples of java.io.ObjectOutputStream.writeInt()


        } else {
            stream.writeInt( -1 );
        }

        stream.writeInt( pc.getActiveActivations() );
        stream.writeInt( pc.getDormantActivations() );

        stream.writeUTF( pc.getEntryPoint().getEntryPointId() );
    }

    public static void writeProcessInstances(MarshallerWriteContext context) throws IOException {
View Full Code Here


    public static void writeProcessInstance(MarshallerWriteContext context,
                                            RuleFlowProcessInstance processInstance) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( processInstance.getId() );
        stream.writeUTF( processInstance.getProcessId() );
        stream.writeInt( processInstance.getState() );
        stream.writeLong( processInstance.getNodeInstanceCounter() );

        VariableScopeInstance variableScopeInstance = (VariableScopeInstance) processInstance.getContextInstance( VariableScope.VARIABLE_SCOPE );
        Map<String, Object> variables = variableScopeInstance.getVariables();
        List<String> keys = new ArrayList<String>( variables.keySet() );
View Full Code Here

                              public int compare(String o1,
                                                 String o2) {
                                  return o1.compareTo( o2 );
                              }
                          } );
        stream.writeInt( keys.size() );
        for ( String key : keys ) {
            stream.writeUTF( key );
            stream.writeObject( variables.get( key ) );
        }
View Full Code Here

            stream.writeObject( variables.get( key ) );
        }

        SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
        Map<String, String> swimlaneActors = swimlaneContextInstance.getSwimlaneActors();
        stream.writeInt( swimlaneActors.size() );
        for ( Map.Entry<String, String> entry : swimlaneActors.entrySet() ) {
            stream.writeUTF( entry.getKey() );
            stream.writeUTF( entry.getValue() );
        }
View Full Code Here

        } else if ( nodeInstance instanceof MilestoneNodeInstance ) {
            stream.writeShort( PersisterEnums.MILESTONE_NODE_INSTANCE );
            List<Long> timerInstances =
              ((MilestoneNodeInstance) nodeInstance).getTimerInstances();
            if (timerInstances != null) {
              stream.writeInt(timerInstances.size());
              for (Long id: timerInstances) {
                stream.writeLong(id);
              }
            } else {
              stream.writeInt(0);
View Full Code Here

              stream.writeInt(timerInstances.size());
              for (Long id: timerInstances) {
                stream.writeLong(id);
              }
            } else {
              stream.writeInt(0);
            }
        } else if ( nodeInstance instanceof TimerNodeInstance ) {
            stream.writeShort( PersisterEnums.TIMER_NODE_INSTANCE );
            stream.writeLong( ((TimerNodeInstance) nodeInstance).getTimerId() );
        } else if ( nodeInstance instanceof JoinInstance ) {
View Full Code Here

            stream.writeShort( PersisterEnums.TIMER_NODE_INSTANCE );
            stream.writeLong( ((TimerNodeInstance) nodeInstance).getTimerId() );
        } else if ( nodeInstance instanceof JoinInstance ) {
            stream.writeShort( PersisterEnums.JOIN_NODE_INSTANCE );
            Map<Long, Integer> triggers = ((JoinInstance) nodeInstance).getTriggers();
            stream.writeInt( triggers.size() );
            List<Long> keys = new ArrayList<Long>( triggers.keySet() );
            Collections.sort( keys,
                              new Comparator<Long>() {
                                  public int compare(Long o1,
                                                     Long o2) {
View Full Code Here

                                      return o1.compareTo( o2 );
                                  }
                              } );
            for ( Long key : keys ) {
                stream.writeLong( key );
                stream.writeInt( triggers.get( key ) );
            }
        } else if ( nodeInstance instanceof CompositeContextNodeInstance ) {
            stream.writeShort( PersisterEnums.COMPOSITE_NODE_INSTANCE );
            CompositeContextNodeInstance compositeNodeInstance = (CompositeContextNodeInstance) nodeInstance;
            VariableScopeInstance variableScopeInstance = (VariableScopeInstance) compositeNodeInstance.getContextInstance( VariableScope.VARIABLE_SCOPE );
View Full Code Here

                                  public int compare(String o1,
                                                     String o2) {
                                      return o1.compareTo( o2 );
                                  }
                              } );
            stream.writeInt( keys.size() );
            for ( String key : keys ) {
                stream.writeUTF( key );
                stream.writeObject( variables.get( key ) );
            }
            List<NodeInstance> nodeInstances = new ArrayList<NodeInstance>( compositeNodeInstance.getNodeInstances() );
View Full Code Here

                                     WorkItem workItem) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( workItem.getId() );
        stream.writeLong( workItem.getProcessInstanceId() );
        stream.writeUTF( workItem.getName() );
        stream.writeInt( workItem.getState() );
        Map<String, Object> parameters = workItem.getParameters();
        stream.writeInt( parameters.size() );
        for ( Map.Entry<String, Object> entry : parameters.entrySet() ) {
            stream.writeUTF( entry.getKey() );
            stream.writeObject( entry.getValue() );
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.