org.jini.rio.monitor
Class ProvisionMonitorAdminImpl

java.lang.Object
  extended by org.jini.rio.resources.servicecore.ServiceAdminImpl
      extended by org.jini.rio.monitor.ProvisionMonitorAdminImpl
All Implemented Interfaces:
DestroyAdmin, Remote, JoinAdmin, ServiceBeanAdmin, ServiceBeanControl, DeployAdmin, ProvisionMonitorAdmin, ServiceAdmin

public class ProvisionMonitorAdminImpl
extends ServiceAdminImpl
implements ProvisionMonitorAdmin

The ProvisionMonitorAdminImpl class implements the ServiceAdmin interface providing administrative support for ServiceProducer implementations.


Field Summary
 
Fields inherited from class org.jini.rio.resources.servicecore.ServiceAdminImpl
adminProxy, exporter
 
Constructor Summary
ProvisionMonitorAdminImpl(ProvisionMonitorImpl service, Exporter exporter)
          Create a ProvisionMonitorAdminImpl
ProvisionMonitorAdminImpl(ProvisionMonitorImpl service, Exporter exporter, SnapshotHandler snapshotHandler)
          Create a ProvisionMonitorAdminImpl
 
Method Summary
 Map deploy(OperationalString opString)
          Deploy an OperationalString to the ProvisionMonitor.
 Map deploy(OperationalString opString, ServiceProvisionListener listener)
          Deploy an OperationalString to the ProvisionMonitor.
 Map deploy(URL opStringURL)
          Deploy an OperationalString URL to the ProvisionMonitor.
 Map deploy(URL opStringURL, ServiceProvisionListener listener)
          Deploy an OperationalString URL to the ProvisionMonitor.
 ProvisionMonitor.PeerInfo[] getBackupInfo()
          Get the ProvisionMonitor instances that are being backed up
 OperationalStringManager getOperationalStringManager(String name)
          This method provides the capability to retrieve an OperationalStringManager for a specific OperationalString
 OperationalStringManager[] getOperationalStringManagers()
          This method provides the capability to retrieve an array of OperationalStringManager objects that are currently managing OperationalString instances that have been deployed.
 ServiceAdmin getServiceAdmin()
          Override parents getServiceAdmin method
 boolean hasDeployed(String opStringName)
          Determine if this ProvisionMonitor has deployed the specified OperationalString as determined by the name
 boolean undeploy(String opStringName)
          Undeploy and Remove an OperationalString deployed by the ProvisionMonitor.
 
Methods inherited from class org.jini.rio.resources.servicecore.ServiceAdminImpl
addLookupAttributes, addLookupGroups, addLookupLocators, advertise, destroy, getJoinSet, getLookupAttributes, getLookupGroups, getLookupLocators, getServiceElement, getUpTime, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocators, setServiceBeanContext, setServiceElement, start, stop, unadvertise, unexport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jini.rio.resources.servicecore.ServiceAdmin
getJoinSet
 
Methods inherited from interface org.jini.rio.core.jsb.ServiceBeanAdmin
getServiceElement, getUpTime, setServiceElement
 
Methods inherited from interface org.jini.rio.core.ServiceBeanControl
advertise, start, stop, unadvertise
 
Methods inherited from interface net.jini.admin.JoinAdmin
addLookupAttributes, addLookupGroups, addLookupLocators, getLookupAttributes, getLookupGroups, getLookupLocators, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocators
 
Methods inherited from interface com.sun.jini.admin.DestroyAdmin
destroy
 

Constructor Detail

ProvisionMonitorAdminImpl

public ProvisionMonitorAdminImpl(ProvisionMonitorImpl service,
                                 Exporter exporter)
Create a ProvisionMonitorAdminImpl

Parameters:
service - Concrete implementation of a ServiceBeanAdapter
exporter - The Exporter to export this object

ProvisionMonitorAdminImpl

public ProvisionMonitorAdminImpl(ProvisionMonitorImpl service,
                                 Exporter exporter,
                                 SnapshotHandler snapshotHandler)
Create a ProvisionMonitorAdminImpl

Parameters:
service - Concrete implementation of a ServiceBeanAdapter
exporter - The Exporter to export this object
snapshotHandler - The service's snapshot handler used for persistence
Method Detail

getServiceAdmin

public ServiceAdmin getServiceAdmin()
                             throws RemoteException
Override parents getServiceAdmin method

Overrides:
getServiceAdmin in class ServiceAdminImpl
Throws:
RemoteException

deploy

public Map deploy(URL opStringURL)
           throws OperationalStringException,
                  RemoteException
Description copied from interface: DeployAdmin
Deploy an OperationalString URL to the ProvisionMonitor. The ProvisionMonitor will load the location and deploy the OperationalString If the OperationalString includes nested OperationalStrings, the nested OperationalStrings will be deployed as well. If nested OperationalString items are already deployed, they will not be re-deployed. If the OperationalString specified by the input URL has already been deployed, or is scheduled for deployment, then no part of that OperationalString (or nested OperationalString instances) will be deployed

Specified by:
deploy in interface DeployAdmin
Parameters:
opStringURL - The URL indicating the location of the OperationalString to deploy
Returns:
If there are errors loading part of the OperationalString the Map will be returned with name value pairs associating the service and corresponding exceptions
Throws:
OperationalStringException
RemoteException

deploy

public Map deploy(URL opStringURL,
                  ServiceProvisionListener listener)
           throws OperationalStringException,
                  RemoteException
Description copied from interface: DeployAdmin
Deploy an OperationalString URL to the ProvisionMonitor. The ProvisionMonitor will load the location and deploy the OperationalString If the OperationalString includes nested OperationalStrings, the nested OperationalStrings will be deployed as well. If nested OperationalString items are already deployed, they will not be re-deployed. If the OperationalString specified by the input URL has already been deployed, or is scheduled for deployment, then no part of that OperationalString (or nested OperationalString instances) will be deployed

Specified by:
deploy in interface DeployAdmin
Parameters:
opStringURL - The URL indicating the location of the OperationalString to deploy
listener - If not null, the ServiceProvisionListener will be notified as each service is deployed
Returns:
If there are errors loading part of the OperationalString the Map will be returned with name value pairs associating the service and corresponding exceptions
Throws:
OperationalStringException
RemoteException

deploy

public Map deploy(OperationalString opString)
           throws OperationalStringException,
                  RemoteException
Description copied from interface: DeployAdmin
Deploy an OperationalString to the ProvisionMonitor. The ProvisionMonitor will deploy the contents specified by the OperationalString object f the OperationalString includes nested OperationalStrings, the nested OperationalStrings will be deployed as well. If nested OperationalString items are already deployed, they will not be re-deployed. If the OperationalString specified by the input URL has already been deployed, or is scheduled for deployment, then no part of that OperationalString (or nested OperationalString instances) will be deployed

Specified by:
deploy in interface DeployAdmin
Parameters:
opString - The OperationalString to deploy
Returns:
If there are errors loading part of the OperationalString the Map will be returned with name value pairs associating the service and corresponding exceptions
Throws:
OperationalStringException
RemoteException

deploy

public Map deploy(OperationalString opString,
                  ServiceProvisionListener listener)
           throws OperationalStringException,
                  RemoteException
Description copied from interface: DeployAdmin
Deploy an OperationalString to the ProvisionMonitor. The ProvisionMonitor will deploy the contents specified by the OperationalString object f the OperationalString includes nested OperationalStrings, the nested OperationalStrings will be deployed as well. If nested OperationalString items are already deployed, they will not be re-deployed. If the OperationalString specified by the input URL has already been deployed, or is scheduled for deployment, then no part of that OperationalString (or nested OperationalString instances) will be deployed

Specified by:
deploy in interface DeployAdmin
Parameters:
opString - The OperationalString to deploy
listener - If not null, the ServiceProvisionListener will be notified as each service is deployed
Returns:
If there are errors loading part of the OperationalString the Map will be returned with name value pairs associating the service and corresponding exceptions
Throws:
OperationalStringException
RemoteException

undeploy

public boolean undeploy(String opStringName)
                 throws OperationalStringException,
                        RemoteException
Description copied from interface: DeployAdmin
Undeploy and Remove an OperationalString deployed by the ProvisionMonitor. The ProvisionMonitor will search for the OperationalString by it's name and if found, remove the OperationalString and any nested OperationalStrings that are included by the OperatinalString. As a result of undeploying the OperationalString(s), all services that have a provision type of ServiceProvisionManagement.DYNAMIC or ServiceProvisionManagement.FIXED will be terminated. If any DeploymentRequest or RedeploymenRequests are pending for the OperationalString(s) being undeployed, these requests will be cancelled

Specified by:
undeploy in interface DeployAdmin
Parameters:
opStringName - The name of the OperationalString to remove
Returns:
Returns true if the OperationalString has been undeployed
Throws:
OperationalStringException - If the OperationalString does not exist
RemoteException - If communication errors occur

hasDeployed

public boolean hasDeployed(String opStringName)
                    throws RemoteException
Description copied from interface: DeployAdmin
Determine if this ProvisionMonitor has deployed the specified OperationalString as determined by the name

Specified by:
hasDeployed in interface DeployAdmin
Parameters:
opStringName - The name of the OperationalString
Returns:
If found return true, otherwise false
Throws:
RemoteException

getOperationalStringManagers

public OperationalStringManager[] getOperationalStringManagers()
                                                        throws RemoteException
Description copied from interface: DeployAdmin
This method provides the capability to retrieve an array of OperationalStringManager objects that are currently managing OperationalString instances that have been deployed. If an OperationalString includes nested OperationalStrings, those OperationalStringManager instances that are nested will be returned as part of this array.

Specified by:
getOperationalStringManagers in interface DeployAdmin
Returns:
Array of OperationalStringManager instances that are managing deployed OperationalString instances
Throws:
RemoteException

getOperationalStringManager

public OperationalStringManager getOperationalStringManager(String name)
                                                     throws OperationalStringException,
                                                            RemoteException
Description copied from interface: DeployAdmin
This method provides the capability to retrieve an OperationalStringManager for a specific OperationalString

Specified by:
getOperationalStringManager in interface DeployAdmin
Parameters:
name - The name of the OperationalString
Returns:
The OperationalStringManager instance that is managing a deployed OperationalString
Throws:
OperationalStringException
RemoteException

getBackupInfo

public ProvisionMonitor.PeerInfo[] getBackupInfo()
                                          throws RemoteException
Description copied from interface: ProvisionMonitorAdmin
Get the ProvisionMonitor instances that are being backed up

Specified by:
getBackupInfo in interface ProvisionMonitorAdmin
Returns:
Array of PeerInfo objects
Throws:
RemoteException


Copyright (c) 2005 Sun Microsystems, Inc.
Copyright (c) 2006 GigaSpaces Technologies, Inc.
All Rights Reserved.