org.openflow.io
Interface OFMessageInStream

All Known Implementing Classes:
OFMessageAsyncStream

public interface OFMessageInStream

Interface for reading OFMessages from a buffered stream

Author:
Rob Sherwood (rob.sherwood@stanford.edu)

Method Summary
 OFMessageFactory getMessageFactory()
          Returns the OFMessageFactory used to create messages on this stream
 java.util.List<OFMessage> read()
          Read OF messages from the stream
 java.util.List<OFMessage> read(int limit)
          Read OF messages from the stream
 void setMessageFactory(OFMessageFactory factory)
          Sets the OFMessageFactory used to create messages on this stream
 

Method Detail

read

java.util.List<OFMessage> read()
                               throws java.io.IOException
Read OF messages from the stream

Returns:
a list of OF Messages, empty if no complete messages are available, null if the stream has closed
Throws:
java.io.IOException

read

java.util.List<OFMessage> read(int limit)
                               throws java.io.IOException
Read OF messages from the stream

Parameters:
limit - The maximum number of messages to read: 0 means all that are buffered
Returns:
a list of OF Messages, empty if no complete messages are available, null if the stream has closed
Throws:
java.io.IOException

setMessageFactory

void setMessageFactory(OFMessageFactory factory)
Sets the OFMessageFactory used to create messages on this stream

Parameters:
factory -

getMessageFactory

OFMessageFactory getMessageFactory()
Returns the OFMessageFactory used to create messages on this stream

Returns: