Examples of OFQueueProperty


Examples of org.openflow.protocol.queue.OFQueueProperty

    @Override
    public List<OFQueueProperty> parseQueueProperties(ByteBuffer data,
            int length, int limit) {
        List<OFQueueProperty> results = new ArrayList<OFQueueProperty>();
        OFQueueProperty demux = new OFQueueProperty();
        OFQueueProperty ofqp;
        int end = data.position() + length;

        while (limit == 0 || results.size() <= limit) {
            if (data.remaining() < OFQueueProperty.MINIMUM_LENGTH ||
                    (data.position() + OFQueueProperty.MINIMUM_LENGTH) > end)
                return results;

            data.mark();
            demux.readFrom(data);
            data.reset();

            if (demux.getLengthU() > data.remaining() ||
                    (data.position() + demux.getLengthU()) > end)
                return results;

            ofqp = getQueueProperty(demux.getType());
            ofqp.readFrom(data);
            if (OFQueueProperty.class.equals(ofqp.getClass())) {
                // advance the position for un-implemented messages
                data.position(data.position()+(ofqp.getLengthU() -
                        OFQueueProperty.MINIMUM_LENGTH));
            }
            results.add(ofqp);
        }
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.