|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimnet.TopologyParser
simnet.SimpleINetParser
A TopologyParser that works with IP addresses.
| Field Summary | |
private static java.lang.String |
BI_LINK
|
protected int |
current_line
|
protected java.util.Hashtable |
hosts
|
protected java.util.Hashtable |
links
|
private java.util.Hashtable |
nattedNodes
|
private java.util.Hashtable |
nattedRouters
|
protected int |
next_link_id
The ID of the next link to create. |
private static java.lang.String |
NODE_UNKNOWN
|
static java.lang.String |
OTTER_TEMP_FILE
|
protected java.util.Hashtable |
routers
|
protected Simulator |
sim
|
private static java.lang.String |
UNI_LINK
|
| Constructor Summary | |
SimpleINetParser()
|
|
| Method Summary | |
protected void |
finalize()
For debugging |
void |
initialize(java.util.Hashtable router_table,
java.util.Hashtable host_table,
java.util.Hashtable link_table)
Initialize this Topology Parser. |
void |
load(java.lang.String filename)
Loads file into a char array and ignores commented lines |
void |
loadElement(java.lang.String line)
Public wrapper to parse(line). |
private void |
parse(java.lang.String line)
Parses a single line and creates network objects accordingly. |
boolean |
prePlugout(java.lang.Object replacement)
We don't need to do anything special for cleanup, but we cannot be removed without replacement. |
void |
save(java.lang.String filename)
Saves the current topology to a file. |
void |
view()
View the current topology. |
void |
view(boolean showIPAddresses)
View the current topology using Otter (writing out to a temp file). |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String NODE_UNKNOWN
private static final java.lang.String BI_LINK
private static final java.lang.String UNI_LINK
protected java.util.Hashtable routers
protected java.util.Hashtable hosts
protected java.util.Hashtable links
protected Simulator sim
private java.util.Hashtable nattedNodes
private java.util.Hashtable nattedRouters
protected transient int current_line
public static final java.lang.String OTTER_TEMP_FILE
protected int next_link_id
| Constructor Detail |
public SimpleINetParser()
| Method Detail |
public void initialize(java.util.Hashtable router_table,
java.util.Hashtable host_table,
java.util.Hashtable link_table)
initialize in class TopologyParserpublic void load(java.lang.String filename)
load in class TopologyParserfilename - name loaded filepublic void loadElement(java.lang.String line)
loadElement in class TopologyParserprivate void parse(java.lang.String line)
line - parsed linepublic void save(java.lang.String filename)
save in class TopologyParserfilename - name to save topology topublic void view()
TopologyParser
view in class TopologyParserpublic void view(boolean showIPAddresses)
view in class TopologyParsershowIPAddresses - whether or not to show the IP addresses of the nodespublic boolean prePlugout(java.lang.Object replacement)
prePlugout in interface Pluggableprotected void finalize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||