org.dbe.eve.factories.servicefactory
Class GroupedServiceFactory

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

public class GroupedServiceFactory
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 GroupedServiceFactory instance
           
 
Fields inherited from class org.dbe.eve.factories.servicefactory.AbstractServiceFactory
aPool, logger, model, mt
 
Constructor Summary
private GroupedServiceFactory()
          creates a new ServiceFactory and a new random AttributePool with number of attributes given from the GUI
 
Method Summary
 Service createService()
          creates new GroupedService with random number of attributes from the attributepool and a random group number based on the configured No of groups starting with 0
 DemandedService createServiceOnDemand(SME sme)
          returns a new demanded Service based on the attributes of a service from the overallservicepool
static GroupedServiceFactory 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 GroupedServiceFactory instance
Constructor Detail

GroupedServiceFactory

private GroupedServiceFactory()
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 GroupedServiceFactory 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 GroupedService with random number of attributes from the attributepool and a random group number based on the configured No of groups starting with 0

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

createServiceOnDemand

public DemandedService createServiceOnDemand(SME sme)
returns a new demanded Service based on the attributes of a service from the overallservicepool

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