public class StaticFlowEntryStorage extends OFModel
OFModel.RESTApi, OFModel.RESTWebUI
Modifier and Type | Field and Description |
---|---|
private OFModel.RESTApi[] |
apis |
private java.util.Map<java.lang.String,java.lang.String> |
entryToDpidMap
This is a reverse index from a flow-mod name to the DPID.
|
private FlowEntryTable |
flowEntryTable
see
FlowEntryTable |
private FlowModEntryTable |
flowModEntryTable
|
OFMStaticFlowEntryPusher |
manager |
private java.lang.String |
name |
private org.openflow.protocol.factory.BasicFactory |
ofMessageFactory |
Constructor and Description |
---|
StaticFlowEntryStorage(OFMStaticFlowEntryPusher manager,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private FlowModEntryTable |
buildFlowModEntryTable()
Read static flowMod entries from storageSource, and store them in a hash.
|
protected java.util.Map<java.lang.String,java.lang.String> |
computeEntry2DpidMap(FlowModEntryTable flowEntry)
Create mappings from each name of the flow-mod record to the DPID of a switch.
|
int |
countEntries()
used for debugging and unit tests
|
OFModel.RESTApi[] |
getAllRestApi()
Returns the URIs mapped to this Restlet object.
|
java.lang.String |
getDpidByEntryName(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getEntryToDpidMap() |
FlowEntryTable |
getFlowEntryTable() |
FlowModEntryTable |
getFlowModEntryTable() |
OFMStaticFlowEntryPusher |
getManager() |
java.lang.String |
getName() |
void |
parseStaticFlowEntry(java.util.Map<java.lang.String,java.lang.Object> row,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.openflow.protocol.OFFlowMod>> entries)
Take a single row, turn it into a flowMod, and add it to the entries.
|
void |
setTableName(java.lang.String name) |
void |
startUp()
Start-up this model.
|
public OFMStaticFlowEntryPusher manager
private java.lang.String name
private FlowEntryTable flowEntryTable
FlowEntryTable
private FlowModEntryTable flowModEntryTable
private java.util.Map<java.lang.String,java.lang.String> entryToDpidMap
private org.openflow.protocol.factory.BasicFactory ofMessageFactory
private OFModel.RESTApi[] apis
StaticFlowEntryStorage(OFMStaticFlowEntryPusher manager, java.lang.String name)
public OFMStaticFlowEntryPusher getManager()
public void setTableName(java.lang.String name)
public java.lang.String getName()
public FlowEntryTable getFlowEntryTable()
public FlowModEntryTable getFlowModEntryTable()
public java.lang.String getDpidByEntryName(java.lang.String name)
public java.util.Map<java.lang.String,java.lang.String> getEntryToDpidMap()
public void parseStaticFlowEntry(java.util.Map<java.lang.String,java.lang.Object> row, java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.openflow.protocol.OFFlowMod>> entries)
row
- a single flow-mod record to be convertedentries
- object where the conversion result is storedpublic int countEntries()
protected java.util.Map<java.lang.String,java.lang.String> computeEntry2DpidMap(FlowModEntryTable flowEntry)
entryToDpidMap
.
This method is called by startUp()
.flowEntry
- flow mod entry tableprivate FlowModEntryTable buildFlowModEntryTable()
startUp()
.FlowModEntryTable
objectpublic void startUp()
FlowModEntryTable
),
and create mappings from the flow-mod record name to the DPIDs.public OFModel.RESTApi[] getAllRestApi()
OFModel
getAllRestApi
in class OFModel