nl.tudelft.simulation.dsol.tutorial.section42
Class Retailer

java.lang.Object
  extended bynl.tudelft.simulation.event.EventProducer
      extended bynl.tudelft.simulation.dsol.tutorial.section42.Retailer
All Implemented Interfaces:
BuyerInterface, nl.tudelft.simulation.event.EventProducerInterface, SellerInterface, java.io.Serializable

public class Retailer
extends nl.tudelft.simulation.event.EventProducer
implements BuyerInterface, SellerInterface

A Retailer
(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Version:
1.0 Dec 8, 2003
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
static nl.tudelft.simulation.event.EventType BACKLOG_LEVEL
          BACKLOG_LEVEL is fired on BACKLOG_LEVEL changes
static nl.tudelft.simulation.event.EventType INVENTORY_LEVEL_EVENT
          INVENTORY_LEVEL_EVENT is fired on changes in inventory
static nl.tudelft.simulation.event.EventType TOTAL_ORDERING_COST_EVENT
          TOTAL_ORDERING_COST_EVENT is fired whenever ordering occurs
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
Retailer(nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator, SellerInterface warehouse)
          constructs a new Retailer
 
Method Summary
 void order(BuyerInterface buyer, long amount)
          order a requested amount
 void receiveProduct(long amount)
          receive the ordered Product
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOTAL_ORDERING_COST_EVENT

public static final nl.tudelft.simulation.event.EventType TOTAL_ORDERING_COST_EVENT
TOTAL_ORDERING_COST_EVENT is fired whenever ordering occurs


INVENTORY_LEVEL_EVENT

public static final nl.tudelft.simulation.event.EventType INVENTORY_LEVEL_EVENT
INVENTORY_LEVEL_EVENT is fired on changes in inventory


BACKLOG_LEVEL

public static final nl.tudelft.simulation.event.EventType BACKLOG_LEVEL
BACKLOG_LEVEL is fired on BACKLOG_LEVEL changes

Constructor Detail

Retailer

public Retailer(nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
                SellerInterface warehouse)
         throws java.rmi.RemoteException
constructs a new Retailer

Parameters:
simulator - the simulator on which we can schedule
warehouse - the warehouse to buy at
Throws:
java.rmi.RemoteException - on failure
Method Detail

receiveProduct

public void receiveProduct(long amount)
Description copied from interface: BuyerInterface
receive the ordered Product

Specified by:
receiveProduct in interface BuyerInterface
Parameters:
amount - the amount to receive
See Also:
#receiveProduct(long)

order

public void order(BuyerInterface buyer,
                  long amount)
Description copied from interface: SellerInterface
order a requested amount

Specified by:
order in interface SellerInterface
Parameters:
buyer - the requesting buyer
amount - the requested amount
See Also:
#order(BuyerInterface,long)


Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.