613c5820a1a7a91b86e15e22e12b37ba4fcc976f
[openflowjava.git] / third-party / openflow-codec / src / main / java / org / openflow / codec / protocol / factory / OFPQueuePropertyFactory.java
1 package org.openflow.codec.protocol.factory;
2
3 import java.util.List;
4
5 import org.openflow.codec.io.IDataBuffer;
6 import org.openflow.codec.protocol.queue.OFPQueueProperty;
7 import org.openflow.codec.protocol.queue.OFPQueuePropertyType;
8
9 /**
10  * The interface to factories used for retrieving OFPQueueProperty instances.
11  * All methods are expected to be thread-safe.
12  *
13  * @author David Erickson (daviderickson@cs.stanford.edu)
14  */
15 public interface OFPQueuePropertyFactory {
16     /**
17      * Retrieves an OFPQueueProperty instance corresponding to the specified
18      * OFPQueuePropertyType
19      *
20      * @param t
21      *            the type of the OFPQueueProperty to be retrieved
22      * @return an OFPQueueProperty instance
23      */
24     public OFPQueueProperty getQueueProperty(OFPQueuePropertyType t);
25
26     /**
27      * Attempts to parse and return all OFQueueProperties contained in the given
28      * DataBuffer, beginning at the DataBuffer's position, and ending at
29      * position+length.
30      *
31      * @param data
32      *            the DataBuffer to parse for OpenFlow OFQueueProperties
33      * @param length
34      *            the number of Bytes to examine for OpenFlow OFQueueProperties
35      * @return a list of OFPQueueProperty instances
36      */
37     public List<OFPQueueProperty> parseQueueProperties(IDataBuffer data, int length);
38
39     /**
40      * Attempts to parse and return all OFQueueProperties contained in the given
41      * DataBuffer, beginning at the DataBuffer's position, and ending at
42      * position+length.
43      *
44      * @param data
45      *            the DataBuffer to parse for OpenFlow OFQueueProperties
46      * @param length
47      *            the number of Bytes to examine for OpenFlow OFQueueProperties
48      * @param limit
49      *            the maximum number of OFQueueProperties to return, 0 means no
50      *            limit
51      * @return a list of OFPQueueProperty instances
52      */
53     public List<OFPQueueProperty> parseQueueProperties(IDataBuffer data, int length, int limit);
54 }