IOFSwitch.SwitchType
Modifier and Type | Field and Description |
---|---|
private int |
actions |
private java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
attributes |
private int |
buffers |
private int |
capabilities |
private Connection |
conn |
private java.util.Date |
connectedSince |
private long |
datapathId |
private org.openflow.protocol.statistics.OFDescriptionStatistics |
description |
private static java.lang.String |
HA_CHECK_SWITCH |
private java.util.concurrent.ConcurrentMap<java.lang.Short,java.lang.Long> |
portBroadcastCacheHitMap |
private java.lang.Object |
portLock |
private java.util.concurrent.ConcurrentHashMap<java.lang.String,org.openflow.protocol.OFPhysicalPort> |
portsByName |
private java.util.concurrent.ConcurrentHashMap<java.lang.Short,org.openflow.protocol.OFPhysicalPort> |
portsByNumber |
private java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.lang.Object> |
responsesCache
This field is used to exchange information with switch.
|
private IOFHandler.Role |
role |
private java.lang.String |
stringId |
private byte |
tables |
private TimedCache<java.lang.Long> |
timedCache |
private java.util.concurrent.atomic.AtomicInteger |
transactionIdSource |
PROP_FASTWILDCARDS, PROP_REQUIRES_L3_MATCH, PROP_SUPPORTS_NETMASK_TBL, PROP_SUPPORTS_OFPP_FLOOD, PROP_SUPPORTS_OFPP_TABLE, SWITCH_DESCRIPTION_DATA, SWITCH_DESCRIPTION_FUTURE, SWITCH_IS_CORE_SWITCH, SWITCH_SUPPORTS_NX_ROLE
Constructor and Description |
---|
OFSwitchImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
clearAllFlowMods()
Clear all flowmods on this switch
|
void |
deletePort(short portNumber)
Delete a port for the switch.
|
void |
deletePort(java.lang.String portName)
Delete a port for the switch.
|
void |
deliverFeaturesReply(int xid,
org.openflow.protocol.OFFeaturesReply reply)
Deliver a feature reply from switch to IOFSwitch object.
|
void |
deliverSwitchStatistics(int xid,
java.util.List<org.openflow.protocol.statistics.OFStatistics> m)
deliver an switch statistics from switch to IOFSwitch object.
|
int |
getActions()
Returns switch features from features Reply
|
java.lang.Object |
getAttribute(java.lang.String name)
Set properties for switch specific behavior
|
java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
getAttributes()
Retrieves attributes of this switch
|
int |
getBuffers()
Returns switch features from features Reply
|
int |
getCapabilities()
Returns switch features from features Reply
|
java.util.Date |
getConnectedSince()
Retrieves the date the switch connected to this controller
|
Connection |
getConnection() |
org.openflow.protocol.statistics.OFDescriptionStatistics |
getDescription()
Get the OFDescriptionStatistics object.
|
java.util.Collection<java.lang.Short> |
getEnabledPortNumbers()
Get list of the port numbers of all enabled ports.
|
java.util.Collection<org.openflow.protocol.OFPhysicalPort> |
getEnabledPorts()
Get list of all enabled ports.
|
org.openflow.protocol.OFFeaturesReply |
getFeaturesReply()
query FEATURE_REPLY to the switch.
|
long |
getId()
Get the datapathId of the switch
|
java.net.SocketAddress |
getInetAddress() |
int |
getNextTransactionId()
Returns the next available transaction id
|
org.openflow.protocol.OFPhysicalPort |
getPort(short portNumber)
Retrieve the port object by the port number.
|
org.openflow.protocol.OFPhysicalPort |
getPort(java.lang.String portName)
Retrieve the port object by the port name.
|
java.util.Map<java.lang.Short,java.lang.Long> |
getPortBroadcastHits()
Get the portBroadcastCacheHits
|
java.util.Collection<org.openflow.protocol.OFPhysicalPort> |
getPorts()
Get list of all ports.
|
IOFHandler.Role |
getRole()
Get the current role of the controller for the switch
|
java.lang.String |
getStringId()
Get a string version of the ID for this switch
|
java.util.List<org.openflow.protocol.statistics.OFStatistics> |
getSwitchStatistics(org.openflow.protocol.OFStatisticsRequest req)
Modules that use IOFSwitch objects use this method to request statistics
to the switch.
|
byte |
getTables()
Returns switch features from features Reply
|
boolean |
hasAttribute(java.lang.String name)
Checks if a specific switch property exists for this switch
|
boolean |
isActive()
Check if the controller is an active controller for the switch.
|
boolean |
isConnected()
Check if the switch is still connected;
Only call while holding processMessageLock
|
boolean |
portEnabled(org.openflow.protocol.OFPhysicalPort port) |
boolean |
portEnabled(short portNumber) |
boolean |
portEnabled(java.lang.String portName) |
java.lang.Object |
removeAttribute(java.lang.String name)
Set properties for switch specific behavior
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set properties for switch specific behavior
|
void |
setConnection(Connection conn) |
void |
setFeaturesReply(org.openflow.protocol.OFFeaturesReply featuresReply)
Set the OFFeaturesReply message returned by the switch during initial
handshake.
|
void |
setPort(org.openflow.protocol.OFPhysicalPort port)
Add or modify a switch port.
|
void |
setSwitchProperties(org.openflow.protocol.statistics.OFDescriptionStatistics description)
Set the SwitchProperties based on it's description
|
java.lang.String |
toString() |
boolean |
updateBroadcastCache(java.lang.Long entry,
java.lang.Short port)
Update broadcast cache
|
private static final java.lang.String HA_CHECK_SWITCH
private java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> attributes
private java.util.Date connectedSince
private Connection conn
private java.lang.String stringId
private org.openflow.protocol.statistics.OFDescriptionStatistics description
private java.util.concurrent.atomic.AtomicInteger transactionIdSource
private java.lang.Object portLock
private java.util.concurrent.ConcurrentHashMap<java.lang.Short,org.openflow.protocol.OFPhysicalPort> portsByNumber
private java.util.concurrent.ConcurrentHashMap<java.lang.String,org.openflow.protocol.OFPhysicalPort> portsByName
private java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.lang.Object> responsesCache
private IOFHandler.Role role
private TimedCache<java.lang.Long> timedCache
private java.util.concurrent.ConcurrentMap<java.lang.Short,java.lang.Long> portBroadcastCacheHitMap
private int capabilities
private int buffers
private int actions
private byte tables
private long datapathId
public void setConnection(Connection conn)
setConnection
in interface IOFSwitch
public Connection getConnection()
getConnection
in interface IOFSwitch
public java.lang.Object getAttribute(java.lang.String name)
IOFSwitch
getAttribute
in interface IOFSwitch
name
- name of propertypublic void setAttribute(java.lang.String name, java.lang.Object value)
IOFSwitch
setAttribute
in interface IOFSwitch
name
- name of propertyvalue
- value for namepublic java.lang.Object removeAttribute(java.lang.String name)
IOFSwitch
removeAttribute
in interface IOFSwitch
name
- name of propertypublic boolean hasAttribute(java.lang.String name)
IOFSwitch
hasAttribute
in interface IOFSwitch
name
- name of propertypublic void setFeaturesReply(org.openflow.protocol.OFFeaturesReply featuresReply)
IOFSwitch
setFeaturesReply
in interface IOFSwitch
public java.util.Collection<org.openflow.protocol.OFPhysicalPort> getEnabledPorts()
IOFSwitch
getEnabledPorts
in interface IOFSwitch
public java.util.Collection<java.lang.Short> getEnabledPortNumbers()
IOFSwitch
getEnabledPortNumbers
in interface IOFSwitch
public org.openflow.protocol.OFPhysicalPort getPort(short portNumber)
IOFSwitch
public org.openflow.protocol.OFPhysicalPort getPort(java.lang.String portName)
IOFSwitch
public void setPort(org.openflow.protocol.OFPhysicalPort port)
IOFSwitch
public java.util.Collection<org.openflow.protocol.OFPhysicalPort> getPorts()
IOFSwitch
public void deletePort(short portNumber)
IOFSwitch
deletePort
in interface IOFSwitch
public void deletePort(java.lang.String portName)
IOFSwitch
deletePort
in interface IOFSwitch
public boolean portEnabled(short portNumber)
portEnabled
in interface IOFSwitch
public boolean portEnabled(java.lang.String portName)
portEnabled
in interface IOFSwitch
public boolean portEnabled(org.openflow.protocol.OFPhysicalPort port)
portEnabled
in interface IOFSwitch
public long getId()
IOFSwitch
public java.lang.String getStringId()
IOFSwitch
getStringId
in interface IOFSwitch
public org.openflow.protocol.statistics.OFDescriptionStatistics getDescription()
IOFSwitch
getDescription
in interface IOFSwitch
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> getAttributes()
IOFSwitch
getAttributes
in interface IOFSwitch
public java.util.Date getConnectedSince()
IOFSwitch
getConnectedSince
in interface IOFSwitch
public int getNextTransactionId()
IOFSwitch
getNextTransactionId
in interface IOFSwitch
public boolean isConnected()
IOFSwitch
isConnected
in interface IOFSwitch
public IOFHandler.Role getRole()
IOFSwitch
public boolean isActive()
IOFSwitch
public void setSwitchProperties(org.openflow.protocol.statistics.OFDescriptionStatistics description)
IOFSwitch
setSwitchProperties
in interface IOFSwitch
public boolean clearAllFlowMods()
IOFSwitch
clearAllFlowMods
in interface IOFSwitch
public java.util.Map<java.lang.Short,java.lang.Long> getPortBroadcastHits()
IOFSwitch
getPortBroadcastHits
in interface IOFSwitch
public java.net.SocketAddress getInetAddress()
public int getBuffers()
IOFSwitch
getBuffers
in interface IOFSwitch
public int getActions()
IOFSwitch
getActions
in interface IOFSwitch
public int getCapabilities()
IOFSwitch
getCapabilities
in interface IOFSwitch
public byte getTables()
IOFSwitch
public boolean updateBroadcastCache(java.lang.Long entry, java.lang.Short port)
IOFSwitch
updateBroadcastCache
in interface IOFSwitch
public java.util.List<org.openflow.protocol.statistics.OFStatistics> getSwitchStatistics(org.openflow.protocol.OFStatisticsRequest req)
getSwitchStatistics
in interface IOFSwitch
req
- OFStatisticsRequest object.public void deliverSwitchStatistics(int xid, java.util.List<org.openflow.protocol.statistics.OFStatistics> m)
IOFSwitch
deliverSwitchStatistics
in interface IOFSwitch
m
- OFStatistics objectspublic org.openflow.protocol.OFFeaturesReply getFeaturesReply()
IOFSwitch
getFeaturesReply
in interface IOFSwitch
public void deliverFeaturesReply(int xid, org.openflow.protocol.OFFeaturesReply reply)
IOFSwitch
deliverFeaturesReply
in interface IOFSwitch