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

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

public class Retailer
extends EventProducer
implements BuyerInterface, SellerInterface

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

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

Field Summary
static EventType BACKLOG_LEVEL
          BACKLOG_LEVEL is fired on BACKLOG_LEVEL changes
static EventType INVENTORY_LEVEL_EVENT
          INVENTORY_LEVEL_EVENT is fired on changes in inventory
static 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(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 EventType TOTAL_ORDERING_COST_EVENT
TOTAL_ORDERING_COST_EVENT is fired whenever ordering occurs


INVENTORY_LEVEL_EVENT

public static final EventType INVENTORY_LEVEL_EVENT
INVENTORY_LEVEL_EVENT is fired on changes in inventory


BACKLOG_LEVEL

public static final EventType BACKLOG_LEVEL
BACKLOG_LEVEL is fired on BACKLOG_LEVEL changes

Constructor Detail

Retailer

public Retailer(DEVSSimulatorInterface simulator,
                SellerInterface warehouse)
         throws RemoteException
constructs a new Retailer

Parameters:
simulator - the simulator on which we can schedule
warehouse - the warehouse to buy at
Throws:
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-2010 Delft University of Technology, the Netherlands. All Rights Reserved.