public final class Connection
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Connection.STATUS |
Modifier and Type | Field and Description |
---|---|
private java.nio.channels.SocketChannel |
client |
private Connection.STATUS |
client_status |
private java.util.Set<IOFHandler> |
handlers |
private int |
seq |
private static int |
SEQ |
private org.openflow.io.OFMessageAsyncStream |
stream |
private IOFSwitch |
sw |
Constructor and Description |
---|
Connection(java.nio.channels.SocketChannel client) |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(IOFHandler handler) |
void |
addHandler(java.util.Set<IOFHandler> handlers) |
void |
close() |
boolean |
flush() |
java.nio.channels.SocketChannel |
getClient() |
java.util.Set<IOFHandler> |
getHandlers() |
int |
getSeq() |
Connection.STATUS |
getStatus() |
org.openflow.io.OFMessageAsyncStream |
getStream() |
IOFSwitch |
getSwitch() |
boolean |
isConnected() |
java.util.List<org.openflow.protocol.OFMessage> |
read() |
void |
setStatus(Connection.STATUS stat) |
void |
setSwitch(IOFSwitch sw) |
boolean |
write(java.util.List<org.openflow.protocol.OFMessage> out) |
boolean |
write(org.openflow.protocol.OFMessage fm) |
private static int SEQ
private java.nio.channels.SocketChannel client
private IOFSwitch sw
private java.util.Set<IOFHandler> handlers
private Connection.STATUS client_status
private org.openflow.io.OFMessageAsyncStream stream
private int seq
public IOFSwitch getSwitch()
public void setSwitch(IOFSwitch sw)
public int getSeq()
public java.nio.channels.SocketChannel getClient()
public java.util.Set<IOFHandler> getHandlers()
public void addHandler(IOFHandler handler)
public void addHandler(java.util.Set<IOFHandler> handlers)
public Connection.STATUS getStatus()
public void setStatus(Connection.STATUS stat)
public org.openflow.io.OFMessageAsyncStream getStream()
public void close()
public boolean isConnected()
public java.util.List<org.openflow.protocol.OFMessage> read() throws java.io.IOException
java.io.IOException
public boolean write(org.openflow.protocol.OFMessage fm)
public boolean flush()
public boolean write(java.util.List<org.openflow.protocol.OFMessage> out)