1 26 27 package org.objectweb.openccm.plugins.transaction.deployment.util; 28 29 30 37 public class ResourceVector 38 { 39 47 protected org.objectweb.ccm.util.Vector list_; 48 49 57 public ResourceVector () 58 { 59 list_ = new org.objectweb.ccm.util.Vector() ; 60 } 61 62 68 78 public void 79 addElement (org.omg.CosTransactions.Resource resource) 80 { 81 list_.addElement (resource); 82 83 } 84 85 90 public void 91 removeElement (org.omg.CosTransactions.Resource resource) 92 { 93 list_.removeElement (resource); 94 } 95 96 101 public void 102 apply (ResourceTreatment action) 103 throws Exception 104 { 105 org.omg.CosTransactions.Resource[] _clone = (org.omg.CosTransactions.Resource[]) list_.toArray(new org.omg.CosTransactions.Resource[0]); 107 108 for (int i=0 ; i<_clone.length ; i++) 109 { 110 action.apply (_clone[i]) ; 111 } 112 } 113 } 114 115 116 117 118 | Popular Tags |