|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nodeNet.Channel
A Channel object is a NodeNetElement that connects two Nodes. A
channel implements both the InputChannel
and
OutputChannel
interfaces. Channels have an assocated
capacity and latency. The capacity of a channel indicates how many
packets may be present before a ChannelFullException
is thrown. The latency of a channel is a measure of how long (in
ms) a packet takes to travel from the input to the output.
Copyright (c) 1998 Massachusetts Institute of Technology
Field Summary | |
static int |
MAX_CAPACITY
the maximum allowable capacity |
static int |
MAX_LATENCY
the maximum allowable latency |
Constructor Summary | |
Channel(Node start,
Node end)
Creates a new Channel with the given start and end nodes. |
Method Summary | |
void |
configure()
|
void |
destroy()
Destroy the Channel. |
boolean |
equals(java.lang.Object o)
Determines if two Channels are equal. |
protected void |
finalize()
|
int |
getCapacity()
|
int |
getLatency()
|
java.lang.String |
getName()
|
boolean |
isDestroyed()
|
boolean |
isEditable()
|
boolean |
isEnabled()
|
boolean |
isInside(int x,
int y)
|
boolean |
isInside(java.awt.Point p)
|
boolean |
isSelected()
|
void |
notifyOfDestruction(NodeNetElement nne)
Notify this that a NodeNetElement has been destroyed. |
void |
paint(java.awt.Graphics g)
|
java.lang.Object |
readObject()
Read an object from the channel. |
void |
run()
|
void |
setCapacity(int cap)
|
void |
setEnabled(boolean b)
|
void |
setLatency(int lat)
|
void |
setName(java.lang.String n)
|
void |
setSelected(boolean b)
|
void |
start()
|
void |
stop()
|
void |
writeObject(java.lang.Object o)
Insert an object into the channel. |
Methods inherited from class java.lang.Object |
clone,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int MAX_LATENCY
public static final int MAX_CAPACITY
Constructor Detail |
public Channel(Node start, Node end) throws SameNodeException
equals
), throws SameNodeException.Method Detail |
public void writeObject(java.lang.Object o) throws ChannelFullException, ChannelDisabledException
o
- The object to be inserted.public java.lang.Object readObject() throws ChannelEmptyException, ChannelDisabledException
public int getCapacity()
public void setCapacity(int cap)
public int getLatency()
public void setLatency(int lat)
public void setSelected(boolean b)
public boolean isSelected()
public void setEnabled(boolean b)
public boolean isEnabled()
public boolean isInside(int x, int y)
public boolean isInside(java.awt.Point p)
public void setName(java.lang.String n)
public java.lang.String getName()
public void destroy()
destroy()
should be called
whenever a Channel will no longer be used. When destroyed,
Channels notify all connected Nodes of the impending destruction.
Note: Channel.finalize()
automatically calls
destroy()
.public boolean isDestroyed()
public void notifyOfDestruction(NodeNetElement nne)
public boolean isEditable()
public void configure()
public void paint(java.awt.Graphics g)
public void start()
public void stop()
public void run()
public boolean equals(java.lang.Object o)
protected void finalize() throws java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |