00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 package org.objectweb.proactive.core.component;
00032
00033 import java.io.Serializable;
00034
00035 import org.objectweb.proactive.Active;
00036 import org.objectweb.proactive.core.body.MetaObjectFactory;
00037
00038
00046 public class ContentDescription implements Serializable {
00047 private String className;
00048 private Object[] constructorParameters;
00049 private Active activity;
00050 private MetaObjectFactory factory;
00051 private boolean uniqueInstance = false;
00052
00061 public ContentDescription(String className, Object[] constructorParameters,
00062 Active activity, MetaObjectFactory factory) {
00063 this.className = className;
00064 this.constructorParameters = constructorParameters;
00065 this.activity = activity;
00066 this.factory = factory;
00067 }
00068
00075 public ContentDescription(String className, Object[] constructorParameters) {
00076 this(className, constructorParameters, null, null);
00077 }
00078
00079
00085 public ContentDescription(String className) {
00086 this(className, null, null, null);
00087 }
00088
00093 public Active getActivity() {
00094 return activity;
00095 }
00096
00101 public String getClassName() {
00102 return className;
00103 }
00104
00109 public void setClassName(String className) {
00110 this.className = className;
00111 }
00112
00117 public Object[] getConstructorParameters() {
00118 return constructorParameters;
00119 }
00120
00125 public MetaObjectFactory getFactory() {
00126 return factory;
00127 }
00128
00129
00135 public void forceSingleInstance() {
00136 uniqueInstance = true;
00137 }
00138
00144 public boolean uniqueInstance() {
00145 return uniqueInstance;
00146 }
00147
00152 public void setFactory(MetaObjectFactory factory) {
00153 this.factory = factory;
00154 }
00155
00160 void setActivity(Active activity) {
00161 this.activity = activity;
00162 }
00163 }