org.dbe.eve.factories.servicefactory
Class ServiceFactory

java.lang.Object
  extended by org.dbe.eve.factories.servicefactory.AbstractServiceFactory
      extended by org.dbe.eve.factories.servicefactory.ServiceFactory

public class ServiceFactory
extends AbstractServiceFactory

extends AbstractServiceFactory implements the main type of Services for the SMEFactory Singleton Pattern is implemented, so only one instance can be made

Since:
16th of November 2006
Author:
Christoph Adelberger

Field Summary
private static ServiceFactory instance
           
 
Fields inherited from class org.dbe.eve.factories.servicefactory.AbstractServiceFactory
aPool, logger, model, mt
 
Constructor Summary
private ServiceFactory()
          creates a new ServiceFactory and a new random AttributePool with number of attributes given from the GUI
 
Method Summary
 Service createService()
          creates new Service with random number of attributes from the attributepool
 DemandedService createServiceOnDemand(SME sme)
          adds a new demanded Service to a SME currently a demanded Service is a new service created by attributes of the AttributePool
static ServiceFactory getInstofServiceFact()
          returns an instance of the ServiceFactory
 void initialiseOfferedServices(SME sme)
          assigns new offered Services to a SME and puts them in the localServicePool of the SME
 
Methods inherited from class org.dbe.eve.factories.servicefactory.AbstractServiceFactory
getServiceFactory, getServiceFactoryType, initialiseDemandedServices, setServiceFactoryType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static ServiceFactory instance
Constructor Detail

ServiceFactory

private ServiceFactory()
creates a new ServiceFactory and a new random AttributePool with number of attributes given from the GUI

Parameters:
EVeModel - instance of an EvEModel
Method Detail

getInstofServiceFact

public static ServiceFactory getInstofServiceFact()
returns an instance of the ServiceFactory

Returns:
ServiceFactory

initialiseOfferedServices

public void initialiseOfferedServices(SME sme)
assigns new offered Services to a SME and puts them in the localServicePool of the SME

Specified by:
initialiseOfferedServices in class AbstractServiceFactory
Parameters:
sme - instance of an SME

createService

public Service createService()
creates new Service with random number of attributes from the attributepool

Specified by:
createService in class AbstractServiceFactory
Parameters:
eVemodel - instance of an EvEModel
Returns:
Service

createServiceOnDemand

public DemandedService createServiceOnDemand(SME sme)
adds a new demanded Service to a SME currently a demanded Service is a new service created by attributes of the AttributePool

Specified by:
createServiceOnDemand in class AbstractServiceFactory
Parameters:
sme - instance of an SME
Returns:
Service