org.gscg.singleuser.handlers
Class InteractiveOrderHandlerStock

java.lang.Object
  extended bynl.tudelft.simulation.content.Handler
      extended bynl.tudelft.simulation.supplychain.handlers.SupplyChainHandler
          extended bynl.tudelft.simulation.supplychain.handlers.OrderHandler
              extended byorg.gscg.singleuser.handlers.InteractiveOrderHandlerStock
All Implemented Interfaces:
nl.tudelft.simulation.content.HandlerInterface, java.io.Serializable

public class InteractiveOrderHandlerStock
extends nl.tudelft.simulation.supplychain.handlers.OrderHandler

The most simple form of an OrderHandler that takes the orders from stock is one that sends out an OrderConfirmation right away, and waits till the delivery date (should be minus the expected transportation time), picks the order, and ships it out as a Shipment. When the order is not available: wait one day and try again till it is available.

Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl . The source code and binary code of this software is proprietary information of Delft University of Technology.

Since:
1.0.0
Version:
$Revision: 1.1 $ $Date: 2005/06/16 12:33:56 $
Author:
Alexander Verbraeck
See Also:
Serialized Form

Field Summary
 
Fields inherited from class nl.tudelft.simulation.supplychain.handlers.OrderHandler
SHIPMENT_AFTER_PAYMENT, SHIPMENT_BEFORE_PAYMENT, SHIPMENT_WITH_PAYMENT, stock
 
Fields inherited from class nl.tudelft.simulation.supplychain.handlers.SupplyChainHandler
owner, validPartners, validProducts
 
Fields inherited from class nl.tudelft.simulation.content.Handler
stream
 
Constructor Summary
InteractiveOrderHandlerStock(nl.tudelft.simulation.supplychain.actor.SupplyChainActor owner, nl.tudelft.simulation.supplychain.stock.StockInterface stock)
          Construct a new InteractiveOrderHandler that takes the goods from stock when ordered.
 
Method Summary
 boolean handleContent(java.io.Serializable content)
           
 void handleOrder(nl.tudelft.simulation.supplychain.content.Order order)
          method sendOrder is called when a user confirms an order
protected  void ship(nl.tudelft.simulation.supplychain.content.Order order)
          Pick and ship the goods.
 
Methods inherited from class nl.tudelft.simulation.supplychain.handlers.OrderHandler
checkContentClass
 
Methods inherited from class nl.tudelft.simulation.supplychain.handlers.SupplyChainHandler
addValidPartner, addValidProduct, checkContent, getValidPartners, getValidProducts, isValidContent, setValidPartners, setValidProducts
 
Methods inherited from class nl.tudelft.simulation.content.Handler
getStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveOrderHandlerStock

public InteractiveOrderHandlerStock(nl.tudelft.simulation.supplychain.actor.SupplyChainActor owner,
                                    nl.tudelft.simulation.supplychain.stock.StockInterface stock)
Construct a new InteractiveOrderHandler that takes the goods from stock when ordered.

Parameters:
owner - the owner of the handler
stock - the stock to use to handle the incoming order
Method Detail

handleContent

public boolean handleContent(java.io.Serializable content)
See Also:
HandlerInterface.handleContent(java.io.Serializable)

ship

protected void ship(nl.tudelft.simulation.supplychain.content.Order order)
Pick and ship the goods.

Parameters:
order - the order that should be handled

handleOrder

public void handleOrder(nl.tudelft.simulation.supplychain.content.Order order)
method sendOrder is called when a user confirms an order

Parameters:
order - the order to send


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