Java 类net.floodlightcontroller.core.IOFMessageFilterManagerService 实例源码

项目:fresco_floodlight    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:iTAP-controller    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:SDN-Multicast    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:arscheduler    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:QoS-floodlight    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:floodlight1.2-delay    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:floodlight-hardware    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager =
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}",
                       new Object[] {fp.getSessionId(), filter,
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter,
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:ACAMPController    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:fast-failover-demo    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:floodlightLB    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:DSC    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:floodlight_with_topoguard    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:floodlight    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:FloodligtModule    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}
项目:multicastSDN    文件:PacketTraceResource.java   
@Post("json")
public PacketTraceOutput packettrace(FilterParameters fp) {

    ConcurrentHashMap <String,String> filter = new ConcurrentHashMap<String,String> ();
    String sid = null;
    PacketTraceOutput output = new PacketTraceOutput();
    IOFMessageFilterManagerService manager = 
            (IOFMessageFilterManagerService)getContext()
                .getAttributes().
                    get(IOFMessageFilterManagerService.class.getCanonicalName());

    if (manager == null) {
        sid = null;
        setStatus(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
    }

    if (fp.getSessionId() != null) {
        filter.put("sessionId", fp.getSessionId());
    }
    if (fp.getMac() != null) {
        filter.put("mac", fp.getMac());
    }
    if (fp.getDirection() != null) {
        filter.put("direction", fp.getDirection());
    }

    if (filter.isEmpty()) {
        setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    } else {
        if (log.isDebugEnabled()) {
            log.debug ("Call setupFilter: sid:{} filter:{}, period:{}", 
                       new Object[] {fp.getSessionId(), filter, 
                                     fp.getPeriod()*1000});
        }
        sid = manager.setupFilter(fp.getSessionId(), filter, 
                                  fp.getPeriod()*1000);
        output.setSessionId(sid);
        setStatus(Status.SUCCESS_OK);
    }

    return output;
}