|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.component.base.ClackComponent net.clackrouter.component.base.Interface net.clackrouter.component.simplerouter.InterfaceIn
public class InterfaceIn
Represents an input interface, a FromDevice(ethX) component, in a Clack router.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent |
---|
ClackComponent.Waiter |
Field Summary | |
---|---|
static int |
NUM_PORTS
|
static int |
PORT_FROM_ROUTER
|
static int |
PORT_TO_INTERNAL
|
Fields inherited from class net.clackrouter.component.base.Interface |
---|
device_name, ETH_BCAST_ADDR, IP_ADDRESS, IP_NETMASK, m_eth_addr, m_ip_addr, m_ip_subnet |
Fields inherited from class net.clackrouter.component.base.ClackComponent |
---|
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT, view |
Constructor Summary | |
---|---|
InterfaceIn(java.lang.String name,
Router router,
TopologyModel.Interface entry)
|
|
InterfaceIn(java.lang.String name,
Router router,
VNSHWInfo.InterfaceEntry entry)
|
Method Summary | |
---|---|
void |
acceptPacket(VNSPacket packet,
int port_number)
Not a valid method for InterfaceIn, which intead communicates directly with the router |
javax.swing.JPanel |
getPropertiesView()
Method for getting the properties view associated with this component Property views are used to display more detailed information about internal component state. |
java.util.Properties |
getSerializableProperties(boolean isTransient)
Used to get all values the component would like to serialize to file. |
void |
initializeProperties(java.util.Properties props)
Method used to initialize a component based on serialized properties values saved to a file. |
protected void |
setupPorts(int numports)
Allocates an array of ClackPort objects to be used by this component |
Methods inherited from class net.clackrouter.component.base.Interface |
---|
getColor, getDeviceName, getIPAddress, getIPSubnet, getMACAddress, getMACAddressString, getTypeName, setIPAddress, setIPSubnet |
Methods inherited from class net.clackrouter.component.base.ClackComponent |
---|
createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getRouter, getTime, getUniqueCount, getView, handlePullRequest, hasError, isHierarchical, isModifying, log, notifyAlarm, poll, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int PORT_TO_INTERNAL
public static int PORT_FROM_ROUTER
public static int NUM_PORTS
Constructor Detail |
---|
public InterfaceIn(java.lang.String name, Router router, VNSHWInfo.InterfaceEntry entry)
public InterfaceIn(java.lang.String name, Router router, TopologyModel.Interface entry)
Method Detail |
---|
protected void setupPorts(int numports)
ClackComponent
setupPorts
in class ClackComponent
numports
- the number of ports to createpublic void acceptPacket(VNSPacket packet, int port_number)
acceptPacket
in class ClackComponent
packet
- The pushed packetport_number
- The number of the port that this packet is arriving onpublic javax.swing.JPanel getPropertiesView()
ClackComponent
getPropertiesView
in class ClackComponent
public void initializeProperties(java.util.Properties props)
ClackComponent
Method used to initialize a component based on serialized properties values saved to a file.
By default, no action is performed
initializeProperties
in class Interface
props
- all property values serialized for this componentpublic java.util.Properties getSerializableProperties(boolean isTransient)
ClackComponent
Used to get all values the component would like to serialize to file.
These values are stored as String -> String pairs in a Properties
object. These
properties will be passed to ClackComponent.initializeProperties(Properties)
when the Component is recreated.
Serialization can be transient or not, which determines whether all or just some of the internal component state is saved. Transient serialization means that some properties will be saved which may make this serialized file invalid for use on different network or router set-ups. For example, saving info specific to the IP addresses of a certain topology would only happen if transient serialization was used. However, it can be desireable to save these properties when setting up exact demonstrations.
By default we have no properties to serialize, so we return an empty object
getSerializableProperties
in class Interface
isTransient
- flag indicating if serialization is transient
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |