verinec.netsim.util.tables
Class SocketSimProccessTable
java.lang.Object
java.util.AbstractMap
verinec.netsim.util.tables.SocketSimProccessTable
- All Implemented Interfaces:
- Map
public class SocketSimProccessTable
- extends AbstractMap
- Version:
- $Revision: 47 $
- Author:
- Dominik Jungo
|
Nested Class Summary |
protected class |
SocketSimProccessTable.Entry
The Entry of this Map containing a Key and the SimProccess that opened the Socket(Key) |
protected class |
SocketSimProccessTable.Key
The key of this Map containing the localhost and destination host address and destination port. |
| Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values |
entryset
private HashSet entryset
SocketSimProccessTable
public SocketSimProccessTable()
- Creates a new ProccessTable
addEntry
public void addEntry(IAddress localhost,
IAddress dsthost,
int dstport,
SimProcess process)
- Creates a new Entry and adds this one to the ProcessTable
- Parameters:
localhost - local address of the socketdsthost - destination address of the socketdstport - destination port of the socketprocess - proccess- See Also:
put(java.lang.Object, java.lang.Object)
getEntry
public SimProcess getEntry(IAddress localhost,
IAddress dsthost,
int dstport)
- Gets an Entry from the ProcessTable
- Parameters:
localhost - local address of the socketdsthost - destination address of the socketdstport - destination port of the socket
- Returns:
- the Entry from the ProcessTable associated with this Socket
getEntry
public SimProcess getEntry(int port)
- gets the process associated to the given port
- Parameters:
port - port of the socket which is associated to this process
- Returns:
- the process associated to the given port
put
public Object put(Object arg0,
Object arg1)
- Specified by:
put in interface Map- Overrides:
put in class AbstractMap
- See Also:
Map.put(java.lang.Object, java.lang.Object)
get
public Object get(Object key)
- Specified by:
get in interface Map- Overrides:
get in class AbstractMap
- See Also:
AbstractMap.get(java.lang.Object)
entrySet
public Set entrySet()
- Specified by:
entrySet in interface Map- Specified by:
entrySet in class AbstractMap
- See Also:
AbstractMap.entrySet()