Rio Project 4.2 API Documentation



org.rioproject.core.provision
Interface ProvisionManager

All Known Subinterfaces:
ProvisionMonitor
All Known Implementing Classes:
ProvisionMonitorImpl

public interface ProvisionManager

The ProvisionManager defines the semantics for ServiceBeanInstantiator instances to register for ServiceProvisionEvent notifications and to provide a feedback mechanism for ServiceBeanInstantiator instances to update their ResourceCapability and ServiceRecords

Author:
Dennis Reedy

Method Summary
 ServiceBeanInstantiator[] getServiceBeanInstantiators()
          Get all registered ServiceBeanInstantiator instances.
 EventRegistration register(ServiceBeanInstantiator instantiator, MarshalledObject handback, ResourceCapability resourceCapability, List<DeployedService> deployedServices, int serviceLimit, long duration)
          Register for notifications of ServiceProvisionEvent objects.
 void update(ServiceBeanInstantiator instantiator, ResourceCapability resourceCapability, List<DeployedService> deployedServices, int serviceLimit)
          Provides a feedback mechanism for a ServiceBeanInstantiator to update it's operational capabilities as described by the ResourceCapability object, and any changes in the maximum number of services the ServiceBeanInstantiator will accept for service provisioning The ServiceBeanInstantiator must have an active Lease with the ProvisionManager for this method to be successful
 

Method Detail

register

EventRegistration register(ServiceBeanInstantiator instantiator,
                           MarshalledObject handback,
                           ResourceCapability resourceCapability,
                           List<DeployedService> deployedServices,
                           int serviceLimit,
                           long duration)
                           throws LeaseDeniedException,
                                  RemoteException
Register for notifications of ServiceProvisionEvent objects. The returned EventRegistration is leased; the lease must be managed by the caller. The event ID in the returned EventRegistration corresponds to the event ID of the ServiceProvisionEvent.

While the EventRegistration is valid, ServiceProvisionEvent notifications are sent to the specified ServiceBeanInstantiator whenever the ProvisionManager determines that a ServiceBeanInstantiator meets requirements specified by the ServiceBean.

Parameters:
instantiator - The ServiceBeanInstantiator
handback - The handback Object to include with event notification
deployedServices - An immutable List of DeployedService objects documenting existing deployed (and active) services. If there are no active services, an empty List must be provided.
resourceCapability - The capabilities of the compute resource
serviceLimit - The maximum amount of services the compute resources will accept for provisioning
duration - The requested lease duration
Returns:
An EventRegistration
Throws:
LeaseDeniedException - If the Lease to the ProvisionManager is denied
RemoteException - If communication errors happen

update

void update(ServiceBeanInstantiator instantiator,
            ResourceCapability resourceCapability,
            List<DeployedService> deployedServices,
            int serviceLimit)
            throws UnknownLeaseException,
                   RemoteException
Provides a feedback mechanism for a ServiceBeanInstantiator to update it's operational capabilities as described by the ResourceCapability object, and any changes in the maximum number of services the ServiceBeanInstantiator will accept for service provisioning

The ServiceBeanInstantiator must have an active Lease with the ProvisionManager for this method to be successful

Parameters:
instantiator - The Listener to send events to
resourceCapability - The capabilities of the compute resource
deployedServices - An immutable List of DeployedService objects documenting existing deployed (and active) services. If there are no active services, an empty List must be provided.
serviceLimit - The maximum amount of services the compute resources will accept for provisioning
Throws:
UnknownLeaseException - If the Lease to the ProvisionManager is unknown
RemoteException - If communication errors happen

getServiceBeanInstantiators

ServiceBeanInstantiator[] getServiceBeanInstantiators()
                                                      throws RemoteException
Get all registered ServiceBeanInstantiator instances.

Returns:
An array of registered ServiceBeanInstantiator instances. If there are no registered ServiceBeanInstantiators, return a zero-length array. A new array is allocated each time
Throws:
RemoteException - If communication errors happen

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.