1 package org.openflow.protocol.factory;
3 import java.nio.ByteBuffer;
6 import org.openflow.protocol.OFType;
7 import org.openflow.protocol.statistics.OFStatistics;
8 import org.openflow.protocol.statistics.OFStatisticsType;
12 * The interface to factories used for retrieving OFStatistics instances. All
13 * methods are expected to be thread-safe.
14 * @author David Erickson (daviderickson@cs.stanford.edu)
16 public interface OFStatisticsFactory {
18 * Retrieves an OFStatistics instance corresponding to the specified
20 * @param t the type of the containing OFMessage, only accepts statistics
22 * @param st the type of the OFStatistics to be retrieved
23 * @return an OFStatistics instance
25 public OFStatistics getStatistics(OFType t, OFStatisticsType st);
28 * Attempts to parse and return all OFStatistics contained in the given
29 * ByteBuffer, beginning at the ByteBuffer's position, and ending at
31 * @param t the type of the containing OFMessage, only accepts statistics
33 * @param st the type of the OFStatistics to be retrieved
34 * @param data the ByteBuffer to parse for OpenFlow Statistics
35 * @param length the number of Bytes to examine for OpenFlow Statistics
36 * @return a list of OFStatistics instances
38 public List<OFStatistics> parseStatistics(OFType t,
39 OFStatisticsType st, ByteBuffer data, int length);
42 * Attempts to parse and return all OFStatistics contained in the given
43 * ByteBuffer, beginning at the ByteBuffer's position, and ending at
45 * @param t the type of the containing OFMessage, only accepts statistics
47 * @param st the type of the OFStatistics to be retrieved
48 * @param data the ByteBuffer to parse for OpenFlow Statistics
49 * @param length the number of Bytes to examine for OpenFlow Statistics
50 * @param limit the maximum number of messages to return, 0 means no limit
51 * @return a list of OFStatistics instances
53 public List<OFStatistics> parseStatistics(OFType t,
54 OFStatisticsType st, ByteBuffer data, int length, int limit);