KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ve > luz > ica > jackass > component > ComponentInfo


1 /*
2  * Copyright (c) 2003 by The Jackass Team
3  * Licensed under the Open Software License version 2.0
4  */

5 package ve.luz.ica.jackass.component;
6
7 import org.apache.commons.pool.ObjectPool;
8 import org.omg.CORBA.Object JavaDoc;
9
10 import ve.luz.ica.jackass.instantiator.JInstantiator;
11
12 /**
13  * A ComponentInfo stores information about the local representation
14  * of a Jackass component (a Corba object)
15  * @author carevalo, narape
16  */

17 public class ComponentInfo
18 {
19     /**
20      * the reference of the object that represents the component locally
21      */

22     private org.omg.CORBA.Object JavaDoc objectReference;
23
24     /**
25      * the {@link Class} object of the proxy servant
26      */

27     private Class JavaDoc proxyObjectClass;
28
29     /**
30      * pool of proxy servants
31      */

32     private ObjectPool proxyPool;
33
34     /**
35      * component context
36      */

37     private JInstantiator instantiator;
38
39     /**
40      * Class constructor
41      * @param objectRef the real object reference
42      * @param proxyClass the {@link Class} object of the proxy servant
43      * @param proxyPool the proxy object pool
44      * @param aInstantiator the instantiator where the real object was created
45      */

46     public ComponentInfo(Object JavaDoc objectRef, Class JavaDoc proxyClass, ObjectPool proxyPool,
47             JInstantiator aInstantiator)
48     {
49         this.objectReference = objectRef;
50         this.proxyObjectClass = proxyClass;
51         this.proxyPool = proxyPool;
52         this.instantiator = aInstantiator;
53     }
54
55     /**
56      * Returns the reference of the object that represents the component locally
57      * @return the object reference
58      */

59     public org.omg.CORBA.Object JavaDoc getReference()
60     {
61         return objectReference;
62     }
63
64     /**
65      * Returns the {@link Class} object of the proxy servant
66      * @return proxy servant class
67      */

68     public Class JavaDoc getProxyClass()
69     {
70         return proxyObjectClass;
71     }
72
73     /**
74      * Returns pool of proxy servants
75      * @return the pool of proxy servants
76      */

77     public ObjectPool getProxyServantPool()
78     {
79         return proxyPool;
80     }
81
82     /**
83      * Returns the instantiator where the component is instantiated
84      * @return the pool of proxy servants
85      */

86     public JInstantiator getInstantiator()
87     {
88         return instantiator;
89     }
90 }
91
Popular Tags