Java 类net.floodlightcontroller.core.types.SwitchMessagePair 实例源码

项目:floodlight1.2-delay    文件:PktInHistory.java   
@Override
public net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
    switch(msg.getType()) {
    case STATS_REQUEST:
        buffer.add(new SwitchMessagePair(sw, msg));
        break;
        case PACKET_IN:
            buffer.add(new SwitchMessagePair(sw, msg));
            break;
        case ECHO_REQUEST:
            buffer.add(new SwitchMessagePair(sw, msg));
            logger.info("ECHO_REQUEST");
            break;
        case ECHO_REPLY:
            buffer.add(new SwitchMessagePair(sw, msg));
            logger.info("ECHO_REPLY");
            break;
        default:
            break;
    }
    return Command.CONTINUE;    
}
项目:floodlight1.2-delay    文件:PktInHistory.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    buffer = new ConcurrentCircularBuffer<SwitchMessagePair>(SwitchMessagePair.class, 100);
    restApi = context.getServiceImpl(IRestApiService.class);
    logger=LoggerFactory.getLogger(PktInHistory.class);
}
项目:floodlight1.2-delay    文件:PktInHistoryResource.java   
@Get("json")
public List<SwitchMessagePair> retrieve() {
    IPktinHistoryService pihr = 
        (IPktinHistoryService)getContext().getAttributes()
            .get(IPktinHistoryService.class.getCanonicalName());
    List<SwitchMessagePair> l = new ArrayList<SwitchMessagePair>();
    l.addAll(java.util.Arrays.asList(pihr.getBuffer().snapshot()));
    return l;
}
项目:FloodligtModule    文件:PktInHistory.java   
@Override
public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
{
    switch(msg.getType())
    {
        case PACKET_IN:
            buffer.add(new SwitchMessagePair(sw, msg));
            break;
        default:
            break;
    }
    return Command.CONTINUE;
}
项目:FloodligtModule    文件:PktInHistory.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException
{
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    restApi = context.getServiceImpl(IRestApiService.class);
    buffer = new ConcurrentCircularBuffer<SwitchMessagePair>(SwitchMessagePair.class, 100);
}
项目:FloodligtModule    文件:PktInHistoryResource.java   
@Get("json")
public List<SwitchMessagePair> retrieve()
{
    IPktinHistoryService pihr = (IPktinHistoryService)getContext().getAttributes().get(IPktinHistoryService.class.getCanonicalName());
    List<SwitchMessagePair> l = new ArrayList<SwitchMessagePair>();
    l.addAll(java.util.Arrays.asList(pihr.getBuffer().snapshot()));
    return l;
}
项目:floodlight-queuepusher    文件:QueuePusher.java   
@Override
public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
    switch(msg.getType()) {
        case PACKET_IN:
            buffer.add(new SwitchMessagePair(sw, msg));
            break;
        default:
            break;
    }
    return Command.CONTINUE;
}
项目:floodlight-queuepusher    文件:QueuePusher.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    restApi = context.getServiceImpl(IRestApiService.class);
    buffer = new ConcurrentCircularBuffer<SwitchMessagePair>(SwitchMessagePair.class, 100);
    logger = LoggerFactory.getLogger(QueuePusher.class);
}
项目:floodlight1.2-delay    文件:PktInHistory.java   
public ConcurrentCircularBuffer<SwitchMessagePair> getBuffer() {
    return buffer;
}
项目:FloodligtModule    文件:PktInHistory.java   
@Override
public ConcurrentCircularBuffer<SwitchMessagePair> getBuffer()
{
    return buffer;
}
项目:floodlight-queuepusher    文件:QueuePusher.java   
@Override
public ConcurrentCircularBuffer<SwitchMessagePair> getBuffer() {
    return buffer;
}
项目:floodlight1.2-delay    文件:IPktinHistoryService.java   
public ConcurrentCircularBuffer<SwitchMessagePair> getBuffer();
项目:FloodligtModule    文件:IPktinHistoryService.java   
public ConcurrentCircularBuffer<SwitchMessagePair> getBuffer();
项目:floodlight-queuepusher    文件:IQueuePusherService.java   
public ConcurrentCircularBuffer<SwitchMessagePair> getBuffer();