jsim.process
Class Sink
java.lang.Object
jsim.process.DynamicNode
jsim.process.Sink
public class Sink
- extends DynamicNode
The Sink class allows consumers (sinks) of entities to be created.
A Sink object destroys entities and collects statistics at the
same time. It is the counterpart of Source which creates entities.
Method Summary |
void |
use(SimObject entity)
This method is called by SimObjects when they are done with
their business and wish to leave the application scenario. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sink
public Sink(Prop props,
Transport[] outgoing)
- Construct a Sink. This constructor has sufficient information
to draw the node (there are no outgoing edges).
- Parameters:
props
- properties of nodeoutgoing
- outgoing transports (should be null)
Sink
public Sink(int id,
Prop props,
Transport[] outgoing,
AnimationQueue queue)
- Construct a Sink. This constructor has sufficient information
to draw the node (there are no outgoing edges).
Version of the constructor to use with animator package
- Parameters:
props
- properties of nodeoutgoing
- outgoing transports (should be null)id
- id of nodequeue
- shared queue for use with animator package
use
public void use(SimObject entity)
- This method is called by SimObjects when they are done with
their business and wish to leave the application scenario.
It also computes lifetime statistics for SimObjects.
- Parameters:
SimObject
- the SimObject that wishes to be captured.