jsim.process
Class Sink

java.lang.Object
  extended by jsim.process.DynamicNode
      extended by 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.


Field Summary
 
Fields inherited from class jsim.process.DynamicNode
costs, duration, occupancy, outgoing, props, trc
 
Constructor Summary
Sink(int id, Prop props, Transport[] outgoing, AnimationQueue queue)
          Construct a Sink.
Sink(Prop props, Transport[] outgoing)
          Construct a Sink.
 
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 jsim.process.DynamicNode
getNodeStats, getOutgoing, getProps, setBatchProperties, setPrimary, setProps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 node
outgoing - 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 node
outgoing - outgoing transports (should be null)
id - id of node
queue - shared queue for use with animator package
Method Detail

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.