Package jadex.examples.shop
Class ShopService
- java.lang.Object
- 
- jadex.bridge.service.BasicService
- 
- jadex.examples.shop.ShopService
 
 
- 
- All Implemented Interfaces:
- IShopService,- IInternalService,- IService
 
 public class ShopService extends BasicService implements IShopService The shop for buying goods at the shop.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IExternalAccesscompThe component.protected java.lang.StringnameThe shop name.- 
Fields inherited from class jadex.bridge.service.BasicServiceidcnt, impltype, internalaccess, providerid, shutdowned, sid, started, type
 - 
Fields inherited from interface jadex.bridge.service.IServiceEMPTY_SERVICES
 
- 
 - 
Constructor SummaryConstructors Constructor Description ShopService(IExternalAccess comp, java.lang.String name)Create a new shop service.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<ItemInfo>buyItem(java.lang.String item, double price)Buy an item.IFuture<ItemInfo[]>getCatalog()Get the item catalog.java.lang.StringgetName()Get the shop name.java.lang.StringtoString()Get the string representation.- 
Methods inherited from class jadex.bridge.service.BasicServicecreateServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getInvokeMethod, getMethodInfos, getMethodTimeout, getPropertyMap, getProviderId, getServiceId, hashCode, initNFProperties, invokeMethod, isValid, setComponentAccess, setPropertyMap, setServiceIdentifier, shutdownService, startService
 
- 
 
- 
- 
- 
Field Detail- 
compprotected IExternalAccess comp The component.
 - 
nameprotected java.lang.String name The shop name.
 
- 
 - 
Constructor Detail- 
ShopServicepublic ShopService(IExternalAccess comp, java.lang.String name) Create a new shop service.- Parameters:
- comp- The active component.
 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the shop name.- Specified by:
- getNamein interface- IShopService
- Returns:
- The name.
 
 - 
buyItempublic IFuture<ItemInfo> buyItem(java.lang.String item, double price) Buy an item.- Specified by:
- buyItemin interface- IShopService
- Parameters:
- item- The item.
 
 - 
getCatalogpublic IFuture<ItemInfo[]> getCatalog() Get the item catalog.- Specified by:
- getCatalogin interface- IShopService
- Returns:
- The catalog.
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- BasicService
- Returns:
- The string representation.
 
 
- 
 
-