Java 类net.floodlightcontroller.core.web.serializers.OFFlowModSerializer 实例源码

项目:fresco_floodlight    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:iTAP-controller    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:SDN-Multicast    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:arscheduler    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:floodlight1.2-delay    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:floodlight-hardware    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:ACAMPController    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:fast-failover-demo    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:floodlightLB    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:DSC    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}
项目:floodlight    文件:OFFlowModMapSerializer.java   
@Override
public void serialize(OFFlowModMap fmm, JsonGenerator jGen, SerializerProvider serializer)
        throws IOException, JsonProcessingException {

       jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true); // IMHO this just looks nicer and is easier to read if everything is quoted

    if (fmm == null) {
        jGen.writeStartObject();
        jGen.writeString("No flows have been added to the Static Flow Pusher.");
        jGen.writeEndObject();
        return;
    }

    Map<String, Map<String, OFFlowMod>> theMap = fmm.getMap();

    jGen.writeStartObject();
    if (theMap.keySet() != null) {
        for (String dpid : theMap.keySet()) {
            if (theMap.get(dpid) != null) {
                jGen.writeArrayFieldStart(dpid);
                for (String name : theMap.get(dpid).keySet()) {
                    jGen.writeStartObject();
                    jGen.writeFieldName(name);
                    OFFlowModSerializer.serializeFlowMod(jGen, theMap.get(dpid).get(name));
                    jGen.writeEndObject();
                }    
                jGen.writeEndArray();
            }
        }
    }
    jGen.writeEndObject();
}