Rio Project 4.2 API Documentation



org.rioproject.tools.cli
Class ServiceProvisionNotification

java.lang.Object
  extended by org.rioproject.tools.cli.ServiceProvisionNotification
All Implemented Interfaces:
Remote, ServerProxyTrust, ServiceProvisionListener

public class ServiceProvisionNotification
extends Object
implements ServiceProvisionListener, ServerProxyTrust

Class to handle ServiceProvisionEvent notifications

Author:
Dennis Reedy

Constructor Summary
ServiceProvisionNotification(Configuration config)
          Create the ServiceProvisionNotification utility
 
Method Summary
 void failed(ServiceElement sElem, boolean resubmitted)
          Notify listener that the Service described by the ServiceElement has not been provision succesfully
static String getDeploymentNames(OperationalString deployment)
          Get the name(s) of the deployments for an OperationalString.
 TrustVerifier getProxyVerifier()
           
 ServiceProvisionListener getServiceProvisionListener()
          Get the ServiceProvisionListener proxy
 void notify(int serviceCount, long maxTimeout)
          Set the number of notifications and the timeout
 void succeeded(ServiceBeanInstance jsbInstance)
          Notify listener that the Service described by the ServiceBeanInstance has been provisioned succesfully
static int sumUpServices(OperationalString deployment)
          Sum up all services that need to be deployed
 void unexport()
          Unexport this utility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceProvisionNotification

public ServiceProvisionNotification(Configuration config)
                             throws ConfigurationException,
                                    ExportException
Create the ServiceProvisionNotification utility

Parameters:
config - The configuration
Throws:
ConfigurationException - If the configuration is no good
ExportException - If the exporter cannot be created
Method Detail

unexport

public void unexport()
Unexport this utility


getServiceProvisionListener

public ServiceProvisionListener getServiceProvisionListener()
Get the ServiceProvisionListener proxy

Returns:
The ServiceProvisionListener proxy

notify

public void notify(int serviceCount,
                   long maxTimeout)
Set the number of notifications and the timeout

Parameters:
serviceCount - the number of services
maxTimeout - The maximum amount of time (in millis) to wait

succeeded

public void succeeded(ServiceBeanInstance jsbInstance)
               throws RemoteException
Description copied from interface: ServiceProvisionListener
Notify listener that the Service described by the ServiceBeanInstance has been provisioned succesfully

Specified by:
succeeded in interface ServiceProvisionListener
Parameters:
jsbInstance - The ServiceBeanInstance
Throws:
RemoteException - If communication errors occur

failed

public void failed(ServiceElement sElem,
                   boolean resubmitted)
            throws RemoteException
Description copied from interface: ServiceProvisionListener
Notify listener that the Service described by the ServiceElement has not been provision succesfully

Specified by:
failed in interface ServiceProvisionListener
Parameters:
sElem - The ServiceElement
resubmitted - Whether the Service described by the ServiceElement has been resubmitted for provisioning
Throws:
RemoteException - If communication errors occur

getProxyVerifier

public TrustVerifier getProxyVerifier()
Specified by:
getProxyVerifier in interface ServerProxyTrust

sumUpServices

public static int sumUpServices(OperationalString deployment)
Sum up all services that need to be deployed

Parameters:
deployment - The deployed OperationalString
Returns:
The number of services indicated by summing up all planned values

getDeploymentNames

public static String getDeploymentNames(OperationalString deployment)
Get the name(s) of the deployments for an OperationalString. If the deployment has nested components, return a comma-separated list of deployment names

Parameters:
deployment - The OperationalString
Returns:
The name(s) of the deployments for an OperationalString.

Copyright © Rio Project.

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