Package org.glassfish.deployapi
Class SunDeploymentManager.TargetModuleIDCollection
- java.lang.Object
-
- 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:
- the constructor - pass a TargetModuleID array as supplied by a client
- the iterator() method, which the client uses to step through the DeploymentFacilityModuleWork instances, each representing a single module and perhaps multiple targets.
- the getProgressObjectSink which returns the aggregator for the ProgressObjects from each work element
-
-
Constructor Summary
Constructors Constructor Description TargetModuleIDCollection(javax.enterprise.deploy.spi.TargetModuleID[] targetModuleIDs)
Create a new instance of TargetModuleIDCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProgressObjectSink
getProgressObjectSink()
Returns the aggregate progress object for the collection.Iterator<SunDeploymentManager.DeploymentFacilityModuleWork>
iterator()
Provides an Iterator over the module work items in the collection.int
size()
Reports the number of elements in the collection.
-
-
-
Constructor Detail
-
TargetModuleIDCollection
public TargetModuleIDCollection(javax.enterprise.deploy.spi.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 ofTargetModuleID
provided from the calling JSR88 client- Throws:
IllegalArgumentException
- unsupported target implementation
-
-
Method Detail
-
iterator
public Iterator<SunDeploymentManager.DeploymentFacilityModuleWork> 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
-
-