|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.infrastructure.Node
org.jscience.architecture.traffic.infrastructure.SpecialNode
org.jscience.architecture.traffic.infrastructure.NetTunnel
public class NetTunnel
NetTunnel, our K-r4D 31337 eAsTr egq0r! ph34R uS !!!!!
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jscience.architecture.traffic.infrastructure.Node |
|---|
Node.NodeStatistics |
| Field Summary | |
|---|---|
protected int |
localPort
The port on which this this Tunnel should be listening |
protected boolean |
netInitialized
Indicates if our network gear is ready for rock 'n roll |
protected boolean |
paused
These variables indicate the state of the infra |
protected java.lang.String |
remoteHostname
The hostname and port to which this Tunnel should send its Roadusers |
protected int |
remotePort
DOCUMENT ME! |
protected java.util.LinkedList |
sendQueue
A LinkedList with Roadusers which are waiting to be send to the remote machine |
protected boolean |
sigStop
These variables indicate the state of the infra |
protected boolean |
stopped
These variables indicate the state of the infra |
protected static int |
type
The type of this node |
| Fields inherited from class org.jscience.architecture.traffic.infrastructure.SpecialNode |
|---|
isAlpha, loadData, road, roadPos, waitingQueue |
| Fields inherited from class org.jscience.architecture.traffic.infrastructure.Node |
|---|
C_DOWN, C_LEFT, C_RIGHT, C_UP, coord, D_AHEAD, D_BACK, D_LEFT, D_RIGHT, EDGE, inboundLanes, JUNCTION, NET_TUNNEL, nodeId, NON_TL, outboundLanes, parentName, spdata, STAT_NUM_DATA, statistics |
| Constructor Summary | |
|---|---|
NetTunnel()
Creates a new NetTunnel object. |
|
NetTunnel(java.awt.Point _coord)
Creates a new NetTunnel object. |
|
| Method Summary | |
|---|---|
void |
doStep(SimModel model)
DOCUMENT ME! |
void |
enter(Roaduser ru)
DOCUMENT ME! |
int |
getLocalPort()
DOCUMENT ME! |
java.lang.String |
getName()
Returns the name of this nettunnel. |
java.lang.String |
getRemoteHostname()
DOCUMENT ME! |
int |
getRemotePort()
DOCUMENT ME! |
int |
getSendQueueLength()
DOCUMENT ME! |
int |
getType()
Returns the type of this node |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
Load this XMLSerializable |
void |
loadSecondStage(java.util.Dictionary dictionaries)
DOCUMENT ME! |
void |
paint(java.awt.Graphics g)
DOCUMENT ME! |
void |
paint(java.awt.Graphics g,
int x,
int y,
float zf)
DOCUMENT ME! |
void |
paint(java.awt.Graphics g,
int x,
int y,
float zf,
double bogus)
DOCUMENT ME! |
void |
processReceive(SimModel model)
DOCUMENT ME! |
void |
processSend()
DOCUMENT ME! |
void |
receive(XMLElement element)
|
void |
reset()
DOCUMENT ME! |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setLocalPort(int localPort)
DOCUMENT ME! |
void |
setRemoteHostname(java.lang.String remoteHostname)
DOCUMENT ME! |
void |
setRemotePort(int remotePort)
DOCUMENT ME! |
void |
start()
DOCUMENT ME! |
void |
stop()
DOCUMENT ME! |
| Methods inherited from class org.jscience.architecture.traffic.infrastructure.SpecialNode |
|---|
addRoad, calcDelay, dequeueRoaduser, enqueueRoaduser, getAllLanes, getAllRoads, getAlpha, getAlphaRoads, getDesiredSignType, getInboundLanes, getLanesLeadingFrom, getLanesLeadingTo, getNumAllLanes, getNumAlphaRoads, getNumInboundLanes, getNumOutboundLanes, getNumRealSigns, getNumRoads, getNumSigns, getOutboundLanes, getRoad, getRoadPos, getWaitingQueue, getWaitingQueueLength, getWidth, isAlphaRoad, isConnected, isConnectedAt, isConnectionPosFree, placeRoaduser, remAllRoads, remRoad, remRoad, setAlpha, setAlphaRoad, setRoad, setRoadPos, setSigns, setWaitingQueue |
| Methods inherited from class org.jscience.architecture.traffic.infrastructure.Node |
|---|
addShortestPath, areAllTailsFree, canCreateInstance, createInstance, getBounds, getCenterPoint, getChildren, getComplexBounds, getCoord, getDirection, getDistance, getId, getNumSkip, getSelectionPoint, getSelectionPoints, getShortestPathDestinations, getShortestPaths, getStatistics, getStatistics, hasChildren, initStats, isSelectable, processStats, remPaths, resetStats, setCoord, setId, setParentName, setShortestPath, updateLanes, zapShortestPaths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jscience.architecture.traffic.xml.XMLSerializable |
|---|
setParentName |
| Field Detail |
|---|
protected static final int type
protected int localPort
protected java.lang.String remoteHostname
protected int remotePort
protected boolean netInitialized
protected java.util.LinkedList sendQueue
protected boolean paused
protected boolean stopped
protected boolean sigStop
| Constructor Detail |
|---|
public NetTunnel()
public NetTunnel(java.awt.Point _coord)
_coord - DOCUMENT ME!| Method Detail |
|---|
public void start()
start in class SpecialNodepublic void stop()
stop in class SpecialNodepublic void enter(Roaduser ru)
enter in class SpecialNoderu - DOCUMENT ME!
public void load(XMLElement myElement,
XMLLoader loader)
throws XMLTreeException,
java.io.IOException,
XMLInvalidInputException
XMLSerializable
load in interface XMLSerializableload in class SpecialNodemyElement - The XMLElement which represents this object in the XML
tree. It can contain attributes which hold information about the
object.loader - The XMLLoader which this XMLSerializable can use to load
child objects.
XMLTreeException - The parser can throw this exception if it is
called by the XMLSerializable. The XMLSerializable should NOT
throw this exception by itself and preferrably not catch it
too.
java.io.IOException - Thrown in case of an read error in the XML file.
XMLInvalidInputException - The XMLSerializable can throw this
exception if it cannot load itself or one of its child objects
for whatever reason.
public XMLElement saveSelf()
throws XMLCannotSaveException
saveSelf in interface XMLSerializablesaveSelf in class SpecialNodeXMLCannotSaveException - DOCUMENT ME!
public void saveChilds(XMLSaver saver)
throws XMLTreeException,
java.io.IOException,
XMLCannotSaveException
saveChilds in interface XMLSerializablesaveChilds in class SpecialNodesaver - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!public java.lang.String getXMLName()
getXMLName in interface XMLSerializablegetXMLName in class SpecialNode
public void loadSecondStage(java.util.Dictionary dictionaries)
throws XMLInvalidInputException,
XMLTreeException
loadSecondStage in interface TwoStageLoaderloadSecondStage in class SpecialNodedictionaries - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!public int getType()
getType in class Nodepublic java.lang.String getName()
getName in class Nodepublic java.lang.String getRemoteHostname()
public int getLocalPort()
public int getRemotePort()
public void setRemoteHostname(java.lang.String remoteHostname)
throws SimulationRunningException
remoteHostname - DOCUMENT ME!
SimulationRunningException - DOCUMENT ME!
public void setLocalPort(int localPort)
throws SimulationRunningException
localPort - DOCUMENT ME!
SimulationRunningException - DOCUMENT ME!
public void setRemotePort(int remotePort)
throws SimulationRunningException
remotePort - DOCUMENT ME!
SimulationRunningException - DOCUMENT ME!public void reset()
reset in class SpecialNodeRoad.reset()public int getSendQueueLength()
public void paint(java.awt.Graphics g)
throws TrafficException
Node
paint in class Nodeg - DOCUMENT ME!
TrafficException - DOCUMENT ME!
public void paint(java.awt.Graphics g,
int x,
int y,
float zf)
throws TrafficException
paint in class Nodeg - DOCUMENT ME!x - DOCUMENT ME!y - DOCUMENT ME!zf - DOCUMENT ME!
TrafficException - DOCUMENT ME!
public void paint(java.awt.Graphics g,
int x,
int y,
float zf,
double bogus)
throws TrafficException
g - DOCUMENT ME!x - DOCUMENT ME!y - DOCUMENT ME!zf - DOCUMENT ME!bogus - DOCUMENT ME!
TrafficException - DOCUMENT ME!
public void receive(XMLElement element)
throws XMLInvalidInputException,
InfraException
XMLInvalidInputException
InfraExceptionpublic void doStep(SimModel model)
doStep in class SpecialNodemodel - DOCUMENT ME!
public void processReceive(SimModel model)
throws InfraException
model - DOCUMENT ME!
InfraException - DOCUMENT ME!
public void processSend()
throws java.io.IOException,
XMLCannotSaveException,
XMLTreeException
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||