40 |
|
|
41 |
import gnu.CORBA.IOR; |
import gnu.CORBA.IOR; |
42 |
import gnu.CORBA.Poa.ORB_1_4; |
import gnu.CORBA.Poa.ORB_1_4; |
43 |
|
import gnu.CORBA.Poa.gnuPOA; |
44 |
|
|
45 |
import org.omg.CORBA.LocalObject; |
import org.omg.CORBA.LocalObject; |
46 |
import org.omg.CORBA.Policy; |
import org.omg.CORBA.Policy; |
47 |
import org.omg.IOP.TaggedComponent; |
import org.omg.IOP.TaggedComponent; |
48 |
import org.omg.PortableInterceptor.IORInfo; |
import org.omg.PortableInterceptor.IORInfo; |
49 |
import org.omg.PortableServer.POA; |
import org.omg.PortableInterceptor.ObjectReferenceFactory; |
50 |
|
import org.omg.PortableInterceptor.ObjectReferenceTemplate; |
51 |
|
|
52 |
/** |
/** |
53 |
* Implements IORInfo. |
* Implements IORInfo. |
69 |
/** |
/** |
70 |
* The POA, to that IOR is related. |
* The POA, to that IOR is related. |
71 |
*/ |
*/ |
72 |
public final POA poa; |
public final gnuPOA poa; |
73 |
|
|
74 |
/** |
/** |
75 |
* The IOR itself. |
* The IOR itself. |
79 |
/** |
/** |
80 |
* Create an instance. |
* Create an instance. |
81 |
*/ |
*/ |
82 |
public gnuIorInfo(ORB_1_4 an_orb, POA a_poa, IOR an_ior) |
public gnuIorInfo(ORB_1_4 an_orb, gnuPOA a_poa, IOR an_ior) |
83 |
{ |
{ |
84 |
orb = an_orb; |
orb = an_orb; |
85 |
poa = a_poa; |
poa = a_poa; |
115 |
/** |
/** |
116 |
* Return the state of the object POA. |
* Return the state of the object POA. |
117 |
*/ |
*/ |
118 |
short state() |
public short state() |
119 |
{ |
{ |
120 |
return (short) poa.the_POAManager().get_state().value(); |
return (short) poa.the_POAManager().get_state().value(); |
121 |
} |
} |
122 |
|
|
123 |
|
/** |
124 |
|
* Get the adapter template, associated with this poa. |
125 |
|
*/ |
126 |
|
public ObjectReferenceTemplate adapter_template() |
127 |
|
{ |
128 |
|
return poa.getReferenceTemplate(); |
129 |
|
} |
130 |
|
|
131 |
|
/** |
132 |
|
* Get the object factory of the current POA. |
133 |
|
*/ |
134 |
|
public ObjectReferenceFactory current_factory() |
135 |
|
{ |
136 |
|
return poa.getReferenceFactory(); |
137 |
|
} |
138 |
|
|
139 |
|
/** |
140 |
|
* Set the object factory of the current POA. |
141 |
|
*/ |
142 |
|
public void current_factory(ObjectReferenceFactory factory) |
143 |
|
{ |
144 |
|
poa.setReferenceFactory(factory); |
145 |
|
} |
146 |
|
|
147 |
|
/** |
148 |
|
* The method currently uses system identity hashcode that should be |
149 |
|
* different for each object. |
150 |
|
*/ |
151 |
|
public int manager_id() |
152 |
|
{ |
153 |
|
// The System.identityHashCode is also called in gnuPoaManager. |
154 |
|
return System.identityHashCode(poa.the_POAManager()); |
155 |
|
} |
156 |
} |
} |