org.cocome.tradingsystem.inventory.application.productdispatcher.impl
Class ProductDispatcher
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.cocome.tradingsystem.inventory.application.productdispatcher.impl.ProductDispatcher
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, ProductDispatcherIf
public class ProductDispatcher
- extends java.rmi.server.UnicastRemoteObject
- implements ProductDispatcherIf
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ProductDispatcher
public ProductDispatcher()
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
orderProductsAvailableAtOtherStores
public ProductAmountTO[] orderProductsAvailableAtOtherStores(EnterpriseTO enterpriseTO,
StoreTO callingStore,
java.util.Collection<ProductAmountTO> productAmounts)
- Description copied from interface:
ProductDispatcherIf
- Executes a query to search for a product (that ran out of stock at one store) at
other stores in the region.
Required for Use-Case 8 (product exchange (on low stock) among stores). Called by
an InventoryApplication
.
- Specified by:
orderProductsAvailableAtOtherStores
in interface ProductDispatcherIf
- Parameters:
enterpriseTO
- The enterprise managing the transfercallingStore
- The store running out of stock.productAmounts
- The products running out at the calling store and the required
amount of those products.
- Returns:
- Returns a list of the required products that will be made available by the
enterprise. The included amount of products might be "0" to indicate that a product
is not available in the enterprise.
Products that are indicates to be available (amount > 0) are prepared for delivery
by the delivering store (markProductsUnavailableInStock).