4 package org.openflow.codec.io;
8 import org.openflow.codec.protocol.OFPMessage;
9 import org.openflow.codec.protocol.factory.OFPMessageFactory;
12 * Interface for reading OFMessages from a buffered stream
14 * @author Rob Sherwood (rob.sherwood@stanford.edu)
17 public interface OFMessageInStream {
19 * Read OF messages from the stream
21 * @return a list of OF Messages, empty if no complete messages are
22 * available, null if the stream has closed
24 public List<OFPMessage> read() throws java.io.IOException;
27 * Read OF messages from the stream
30 * The maximum number of messages to read: 0 means all that are
32 * @return a list of OF Messages, empty if no complete messages are
33 * available, null if the stream has closed
36 public List<OFPMessage> read(int limit) throws java.io.IOException;
39 * Sets the OFPMessageFactory used to create messages on this stream
43 public void setMessageFactory(OFPMessageFactory factory);
46 * Returns the OFPMessageFactory used to create messages on this stream
50 public OFPMessageFactory getMessageFactory();