org.gcube.vremanagement.resourcemanager.impl.brokerage
Interface Broker

All Known Implementing Classes:
InternalBroker, ServiceBroker

public interface Broker

Models the expected behavior of a Broker. A Broker is an entity that can create Deployment Plans for a set of ScopedDeployedSoftwares to be deployed

Author:
Manuele Simi (ISTI-CNR)

Method Summary
 void initialize(ScopeState scopeState)
          Initializes the Broker instance
 void makePlan(Session session, Set<ScopedDeployedSoftware> services, String[] suggestedGHNs)
          Creates a deployment plan for the given services
 void sendFeedback(Session session)
          Sends feedback to the broker about the execution of the plan for the given session
 

Method Detail

initialize

void initialize(ScopeState scopeState)
                throws Exception
Initializes the Broker instance

Parameters:
scopeState - the state where the broker will act
Throws:
Exception - if the initialization fails (depends on the broker's nature)

makePlan

void makePlan(Session session,
              Set<ScopedDeployedSoftware> services,
              String[] suggestedGHNs)
              throws Exception
Creates a deployment plan for the given services

Parameters:
session - the current active session on the state
services - the services to deploy
suggestedGHNs - the (eventually) GHNs suggested for the deployment, if specified, only these nodes will be used by the planner
Throws:
Exception - if the preparation of the plan fails

sendFeedback

void sendFeedback(Session session)
                  throws Exception
Sends feedback to the broker about the execution of the plan for the given session

Parameters:
session - the current active session on the state
Throws:
Exception - if the broker is not able to manage the feedback


Copyright © 2012. All Rights Reserved.