Package org.apache.avro.generic

Examples of org.apache.avro.generic.GenericRecordBuilder.build()


      GenericRecord ofpFlowModRecord = new GenericData.Record(ofpFlowModSchema);
     
      GenericRecordBuilder builder = null;

      builder = new GenericRecordBuilder (flowModHeaderSchema);
      GenericRecord flowModHeaderRecord = builder.build();
     
      Schema flowModBodySchema = protocol.getType("of13.flow_mod_body_add");
      builder = new GenericRecordBuilder(flowModBodySchema);
      GenericRecord flowModBodyRecord = builder.build();
     
View Full Code Here


      builder = new GenericRecordBuilder (flowModHeaderSchema);
      GenericRecord flowModHeaderRecord = builder.build();
     
      Schema flowModBodySchema = protocol.getType("of13.flow_mod_body_add");
      builder = new GenericRecordBuilder(flowModBodySchema);
      GenericRecord flowModBodyRecord = builder.build();
     
      GenericRecord ofpMatchRecord = null;
      Schema ofpMatchSchema = null;
     
      List <GenericRecord> instructions = new ArrayList<>();
View Full Code Here

      /*
       * Build match header
       */
      Schema matchHeaderSchema = protocol.getType("of13.match_header");
      GenericRecordBuilder matchHeaderBuilder = new GenericRecordBuilder(matchHeaderSchema);
      GenericRecord matchHeaderRecord = matchHeaderBuilder.build();
     
      /*
       * Calculating oxm_tlvs length
       */
      ByteArrayOutputStream oxmOut = new ByteArrayOutputStream();
View Full Code Here

            isActions = false;           
            break;
         }
        
         GenericRecordBuilder instrHeaderBuilder = new GenericRecordBuilder(instrHeaderSchema);
         instrHeaderRecord = instrHeaderBuilder.build();
         instrRecord.put("header", instrHeaderRecord);
        

         if (isActions) {
            List<Tuple<String, String>> actionList = instruction.getActions().getActions();
View Full Code Here

              
               switch (actName) {
               case "output":
                  Schema ofpActionOutSchema = protocol.getType("of13.ofp_action_output");
                  GenericRecordBuilder actionBuilder = new GenericRecordBuilder(ofpActionOutSchema);
                  GenericRecord ofpActionOutRecord = actionBuilder.build();
                 
                  ofpActionOutRecord.put("port", getUint32Fixed(Integer.decode(action.getValue())));
                  ofpActionRecord.put("action", ofpActionOutRecord);

                  break;
View Full Code Here

         flowModBodySchema = protocol.getType("of13.flow_mod_body_add");
         isDelete = false;
      }
     
      GenericRecordBuilder flowModBodyBuilder = new GenericRecordBuilder(flowModBodySchema);
      GenericRecord flowModBodyRecord = flowModBodyBuilder.build();
      GenericRecord actionSetRecord = null; // TODO Empty actions instead of null!
     
      List <GenericRecord> instructions = new ArrayList<>();
      List <GenericRecord> matches = new ArrayList<>();
     
View Full Code Here

               instrSchema = protocol.getType("of13.ofp_instruction_clear_actions");
               instrRecord = new GenericData.Record(instrSchema);
            }
           
            GenericRecordBuilder instrHeaderBuilder = new GenericRecordBuilder(instrHeaderSchema);
            instrHeaderRecord = instrHeaderBuilder.build();
            instrRecord.put("header", instrHeaderRecord);
            instrRecord.put("actions", actionSetRecord);
           
            instrHeaderRecord.put("length", getUint16Fixed(calculateLength(instrSchema, instrRecord)));
            instrRecord.put("header", instrHeaderRecord);
View Full Code Here

      /*
       * Build match header
       */
      Schema matchHeaderSchema = protocol.getType("of13.match_header");
      GenericRecordBuilder matchHeaderBuilder = new GenericRecordBuilder(matchHeaderSchema);
      GenericRecord matchHeaderRecord = matchHeaderBuilder.build();
     
      /*
       * Calculating oxm_tlvs length
       */
      ByteArrayOutputStream oxmOut = new ByteArrayOutputStream();
View Full Code Here

/* F L O W  M O D  M E S S A G E */ 
      /*
       * Create FlowMod Header
       */
      GenericRecordBuilder flowModHeaderBuilder = new GenericRecordBuilder(flowModHeaderSchema);
      GenericRecord flowModHeaderRecord = flowModHeaderBuilder.build();
     
      /*
       * Assemble Flow_mod message
       */
      ofpFlowModRecord.put("header", flowModHeaderRecord);     
View Full Code Here

      GenericRecord ofpActionBaseRecord = new GenericData.Record(ofpActionSchema);
       
   
      Schema ofpActionOutSchema = protocol.getType("of13.ofp_action_output");
      GenericRecordBuilder actionBuilder = new GenericRecordBuilder(ofpActionOutSchema);
      GenericRecord ofpActionOutRecord = actionBuilder.build();
     
      n = Pattern.compile("output=(?:((?:0x)?\\d+)|(all)|(controller)|(local)|(ingress-port)|(normal)|(flood))").matcher(subaction);
      if (n.matches()) {

//          int port = OFPort.OFPP_NONE.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.