org.glassfish.deployapi
Class SunDeploymentManager.TargetModuleIDCollection

java.lang.Object
  extended by org.glassfish.deployapi.SunDeploymentManager.TargetModuleIDCollection
Enclosing class:
SunDeploymentManager

protected static class SunDeploymentManager.TargetModuleIDCollection
extends Object

Organizes the target module IDs passed by a JSR88 client for easy processing one module ID at a time.

Several methods in the JSR88 DeploymentManager interface accept a list of TargetModuleID values, and these lists can refer to multiple module IDs and multiple targets. Each invocation of a DeploymentFacility method, on the other hand, can work on only a single module although with perhaps multiple targets. This class provides a central way of organizing the target module IDs as passed from the JSR88 client and making the information for a single module ID readily available.

Typically, a client will use three methods:


Constructor Summary
SunDeploymentManager.TargetModuleIDCollection(TargetModuleID[] targetModuleIDs)
          Create a new instance of TargetModuleIDCollection.
 
Method Summary
 ProgressObjectSink getProgressObjectSink()
          Returns the aggregate progress object for the collection.
 Iterator iterator()
          Provides an Iterator over the module work items in the collection.
 int size()
          Reports the number of elements in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunDeploymentManager.TargetModuleIDCollection

public SunDeploymentManager.TargetModuleIDCollection(TargetModuleID[] targetModuleIDs)
                                              throws IllegalArgumentException
Create a new instance of TargetModuleIDCollection. Accept the array of targetModuleIDs as passed by the JSR88 client and set up the internal data structures.

Parameters:
targetModuleIDs - array of TargetModuleID provided from the calling JSR88 client
Throws:
IllegalArgumentException
Method Detail

iterator

public Iterator iterator()
Provides an Iterator over the module work items in the collection. The iterator provides one element for each distinct module that appeared in the original array of TargetModuleIDs.

Returns:
Iterator over the DeploymentFacilityModuleWork elements in the collection

size

public int size()
Reports the number of elements in the collection. This is also a measure of the number of distinct module IDs specified in the TargetModuleID array passed to the constructor of the collection.

Returns:
the number of DeploymentFacilityModuleWork elements contained in the collection

getProgressObjectSink

public ProgressObjectSink getProgressObjectSink()
Returns the aggregate progress object for the collection. Creates a new ProgressObjectSink if needed.

Returns:
ProgressObjectSink


Copyright © 2012. All Rights Reserved.