|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.content.Handler
nl.tudelft.simulation.supplychain.handlers.SupplyChainHandler
SupplyChainHandler is the SupplyChainActor specific abstract Handler class.
It has a SupplyChainActor as owner, making it unnecessary to cast the Actor
all the time to a SupplyChainActor.
The generic SupplyChainHandler already has the methods to check whether the
content is of the right type, and methods to do basic filtering on product
and on the partner with whom the owner is dealing. This makes it very easy to
have different handlers for e.g. production orders and for purchase orders;
it can be done on the basis of the message sender (in case of production
orders the owner itself), or on the basis of the product type.
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.
| Field Summary | |
protected SupplyChainActor |
owner
the owner of the handler |
protected java.util.Set |
validPartners
the partner actors for which this handler is valid |
protected java.util.Set |
validProducts
the products for which this handler is valid |
| Fields inherited from class nl.tudelft.simulation.content.Handler |
stream |
| Constructor Summary | |
SupplyChainHandler(SupplyChainActor owner)
|
|
| Method Summary | |
void |
addValidPartner(SupplyChainActor partner)
Add a valid partner to the list of supply chain partners to handle with this handler. |
void |
addValidProduct(Product product)
Add a valid product to the list of products to handle with this handler. |
protected Content |
checkContent(java.io.Serializable serContent)
Method checkContent. |
protected abstract boolean |
checkContentClass(java.io.Serializable content)
Check whether the content is of the right type for this handler |
java.util.Set |
getValidPartners()
|
java.util.Set |
getValidProducts()
|
protected boolean |
isValidContent(Content content)
Check partner and content for validity for this handler. |
void |
setValidPartners(java.util.Set validPartners)
Replace the current set of valid partners. |
void |
setValidProducts(java.util.Set validProducts)
Replace the current set of valid products. |
| Methods inherited from class nl.tudelft.simulation.content.Handler |
getStream, handleContent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected SupplyChainActor owner
protected java.util.Set validProducts
protected java.util.Set validPartners
| Constructor Detail |
public SupplyChainHandler(SupplyChainActor owner)
owner - the a that 'owns' the handler| Method Detail |
protected abstract boolean checkContentClass(java.io.Serializable content)
content - the content to check
protected Content checkContent(java.io.Serializable serContent)
serContent - the content to check
public void addValidProduct(Product product)
product - a new valid product to usepublic java.util.Set getValidProducts()
public void setValidProducts(java.util.Set validProducts)
validProducts - A new set of valid productspublic void addValidPartner(SupplyChainActor partner)
partner - a new valid partner to usepublic java.util.Set getValidPartners()
public void setValidPartners(java.util.Set validPartners)
validPartners - A new set of valid partners.protected boolean isValidContent(Content content)
content - the content to check
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||