1 31 package org.objectweb.proactive.core.component; 32 33 import org.objectweb.proactive.Active; 34 import org.objectweb.proactive.core.body.MetaObjectFactory; 35 import org.objectweb.proactive.core.descriptor.data.VirtualNode; 36 import org.objectweb.proactive.core.node.Node; 37 38 39 46 public class ContentDescription { 47 private String className; 48 private Object [] constructorParameters; 49 private Active activity; 50 private MetaObjectFactory factory; 51 private VirtualNode virtualNode = null; 52 private Node node = null; 53 54 64 public ContentDescription(String className, Object [] constructorParameters, 65 VirtualNode virtualNode, Active activity, MetaObjectFactory factory) { 66 this.className = className; 67 this.constructorParameters = constructorParameters; 68 this.virtualNode = virtualNode; 69 this.activity = activity; 70 this.factory = factory; 71 } 72 73 83 public ContentDescription(String className, Object [] constructorParameters, 84 Node node, Active activity, MetaObjectFactory factory) { 85 this.className = className; 86 this.constructorParameters = constructorParameters; 87 this.node = node; 88 this.activity = activity; 89 this.factory = factory; 90 } 91 92 99 public ContentDescription(String className, Object [] constructorParameters) { 100 this(className, constructorParameters, (Node) null, null, null); 101 } 102 103 111 public ContentDescription(String className, Object [] constructorParameters, 112 VirtualNode virtualNode) { 113 this(className, constructorParameters, virtualNode, null, null); 114 } 115 116 124 public ContentDescription(String className, Object [] constructorParameters, 125 Node node) { 126 this(className, constructorParameters, node, null, null); 127 } 128 129 136 public ContentDescription(String className) { 137 this(className, null, (Node) null, null, null); 138 } 139 140 144 public Active getActivity() { 145 return activity; 146 } 147 148 152 public String getClassName() { 153 return className; 154 } 155 156 160 public Object [] getConstructorParameters() { 161 return constructorParameters; 162 } 163 164 168 public MetaObjectFactory getFactory() { 169 return factory; 170 } 171 172 176 public boolean isLocalizedOnAVirtualNode() { 177 return ((virtualNode != null) && (node == null)); 178 } 179 180 184 public Node getNode() { 185 return node; 186 } 187 188 192 public VirtualNode getVirtualNode() { 193 return virtualNode; 194 } 195 196 200 public void setVirtualNode(VirtualNode virtualNode) { 201 this.virtualNode = virtualNode; 202 node = null; 203 } 204 205 209 public void setNode(Node node) { 210 this.node = node; 211 virtualNode = null; 212 } 213 214 217 void setFactory(MetaObjectFactory factory) { 218 this.factory = factory; 219 } 220 } 221 | Popular Tags |