4 package org.openflow.codec.io;
8 import org.openflow.codec.protocol.OFPMessage;
11 * Interface for writing OFMessages to a buffered stream
13 * @author Rob Sherwood (rob.sherwood@stanford.edu)
16 public interface OFMessageOutStream {
18 * Write an OpenFlow message to the stream
23 public void write(OFPMessage m) throws java.io.IOException;
26 * Write an OpenFlow message to the stream. Messages are sent in one large
27 * write() for efficiency
30 * A list of OF Messages
32 public void write(List<OFPMessage> l) throws java.io.IOException;
35 * Pushes buffered data out the Stream; this is NOT guranteed to flush all
36 * data, multiple flush() calls may be required, until needFlush() returns
39 public void flush() throws java.io.IOException;
42 * Is there buffered data that needs to be flushed?
44 * @return true if there is buffered data and flush() should be called
46 public boolean needsFlush();