BrokerBuilderDecorator

public class BrokerBuilderDecorator implements BrokerBuilderInterface

A class that implements the Decorator Design Pattern in order to include features in a existing class. It is used to ensure that specific methods are called only after a given method is called.

For instance, the methods getVmBuilder() and getCloudletBuilder() can only be called after some DatacenterBrokerSimple was created by calling the method createBroker(). By this way, after the method is called, it returns an instance of this decorator that allow chained call to the specific decorator methods as the following example:

Author:Manoel Campos da Silva Filho

Constructors

BrokerBuilderDecorator

public BrokerBuilderDecorator(BrokerBuilder builder, DatacenterBrokerSimple broker)

Methods

createBroker

public BrokerBuilderDecorator createBroker()

findBroker

public DatacenterBroker findBroker(int id)

get

public DatacenterBroker get(int index)

getBroker

public DatacenterBroker getBroker()
Returns:the latest created broker

getBrokers

public List<DatacenterBroker> getBrokers()

getCloudletBuilder

public CloudletBuilder getCloudletBuilder()
Returns:the CloudletBuilder in charge of creating Cloudlets to the latest DatacenterBroker created by this BrokerBuilder

getVmBuilder

public VmBuilder getVmBuilder()
Returns:the VmBuilder in charge of creating VMs to the latest DatacenterBroker created by this BrokerBuilder