Examples of parseMessage()


Examples of org.openflow.protocol.factory.BasicFactory.parseMessage()

        m.setLength(U16.t(8));
        m.setXid(0xdeadbeef);
        ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
        m.writeTo(bb);
        try {
                factory.parseMessage(bb);
        }
        catch(Exception e) {
            TestCase.assertEquals(MessageParseException.class, e.getClass());
        }
    }
View Full Code Here

Examples of org.openflow.protocol.factory.OFMessageFactory.parseMessage()

                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                0x00 };
        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer oferrorBuf =
                ChannelBuffers.wrappedBuffer(oferrorRaw);
        List<OFMessage> msg = factory.parseMessage(oferrorBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertEquals(76, msg.get(0).getLengthU());
        ChannelBuffer out = ChannelBuffers.dynamicBuffer();
        msg.get(0).writeTo(out);
View Full Code Here

Examples of org.openflow.protocol.factory.OFMessageFactory.parseMessage()

                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                (byte) 0xff, 0x00, (byte) 0xff, (byte) 0xff };

        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer packetBuf = ChannelBuffers.wrappedBuffer(packet);
        List<OFMessage> msg = factory.parseMessage(packetBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertTrue(msg.get(0) instanceof OFStatisticsRequest);
        OFStatisticsRequest sr = (OFStatisticsRequest) msg.get(0);
        TestCase.assertEquals(OFStatisticsType.FLOW, sr.getStatisticType());
View Full Code Here

Examples of org.openflow.protocol.factory.OFMessageFactory.parseMessage()

                0x00, 0x00, 0x00, 0x00, (byte) 0xff, 0x00, 0x00, 0x00,
                (byte) 0xff, (byte) 0xff, 0x4e, 0x20 };

        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer packetBuf = ChannelBuffers.wrappedBuffer(packet);
        List<OFMessage> msg = factory.parseMessage(packetBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertTrue(msg.get(0) instanceof OFStatisticsRequest);
        OFStatisticsRequest sr = (OFStatisticsRequest) msg.get(0);
        TestCase.assertEquals(OFStatisticsType.VENDOR, sr.getStatisticType());
View Full Code Here

Examples of org.openflow.protocol.factory.OFMessageFactory.parseMessage()

                0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0xc4, 0x00, 0x00, 0x00,
                0x08, 0x00, 0x02, 0x00, 0x00 };

        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer packetBuf = ChannelBuffers.wrappedBuffer(packet);
        List<OFMessage> msg = factory.parseMessage(packetBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertTrue(msg.get(0) instanceof OFStatisticsReply);
        OFStatisticsReply sr = (OFStatisticsReply) msg.get(0);
        TestCase.assertEquals(OFStatisticsType.FLOW, sr.getStatisticType());
View Full Code Here

Examples of org.zyp.cn8583.cnMessageFactory.parseMessage()

    buf = new byte[len];
    fin.read(buf)// �ӵ�����ֽڶ�ȡlen���ֽڵ����ݵ�buf��
    fin.close();
   
    mfact.setUseBinary(false);
    m = mfact.parseMessage(buf, mfact.getHeaderLengthAttr("0200"))// ����
    print(m);
   
  }

  // ���һ����������
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.