Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
From-SVN: r107049
This commit is contained in:
@@ -38,16 +38,20 @@ exception statement from your version. */
|
||||
|
||||
package gnu.CORBA.Interceptor;
|
||||
|
||||
import org.omg.CORBA.OBJ_ADAPTER;
|
||||
import org.omg.CORBA.OMGVMCID;
|
||||
import org.omg.PortableInterceptor.IORInfo;
|
||||
import org.omg.PortableInterceptor.IORInterceptor;
|
||||
import org.omg.PortableInterceptor.IORInterceptorOperations;
|
||||
import org.omg.PortableInterceptor.IORInterceptor_3_0Operations;
|
||||
import org.omg.PortableInterceptor.ObjectReferenceTemplate;
|
||||
|
||||
/**
|
||||
* A block of the all registered IOR interceptors.
|
||||
*
|
||||
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
|
||||
*/
|
||||
public class IORInterceptors implements IORInterceptorOperations
|
||||
public class IORInterceptors implements IORInterceptor_3_0Operations
|
||||
{
|
||||
/**
|
||||
* The array of all registered IOR interceptors.
|
||||
@@ -106,4 +110,81 @@ public class IORInterceptors implements IORInterceptorOperations
|
||||
{
|
||||
return getClass().getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method for all registered CORBA 3.0 interceptors.
|
||||
*/
|
||||
public void adapter_manager_state_changed(int adapterManagerId, short adapterState)
|
||||
{
|
||||
for (int i = 0; i < interceptors.length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (interceptors[i] instanceof IORInterceptor_3_0Operations)
|
||||
{
|
||||
((IORInterceptor_3_0Operations) interceptors[i]).
|
||||
adapter_manager_state_changed(adapterManagerId, adapterState);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
OBJ_ADAPTER oa = new OBJ_ADAPTER("components_established failed");
|
||||
oa.initCause(exc);
|
||||
oa.minor = 6 | OMGVMCID.value;
|
||||
throw oa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method for all registered CORBA 3.0 interceptors.
|
||||
*/
|
||||
public void adapter_state_changed(ObjectReferenceTemplate[] adapters, short adaptersState)
|
||||
{
|
||||
for (int i = 0; i < interceptors.length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (interceptors[i] instanceof IORInterceptor_3_0Operations)
|
||||
{
|
||||
((IORInterceptor_3_0Operations) interceptors[i]).
|
||||
adapter_state_changed(adapters, adaptersState);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
OBJ_ADAPTER oa = new OBJ_ADAPTER("components_established failed");
|
||||
oa.initCause(exc);
|
||||
oa.minor = 6 | OMGVMCID.value;
|
||||
throw oa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method for all registered CORBA 3.0 interceptors.
|
||||
*
|
||||
* @throws OBJ_ADAPTER minor 6 on any failure (as defined by OMG specs).
|
||||
*/
|
||||
public void components_established(IORInfo info)
|
||||
{
|
||||
for (int i = 0; i < interceptors.length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (interceptors[i] instanceof IORInterceptor_3_0Operations)
|
||||
{
|
||||
((IORInterceptor_3_0Operations) interceptors[i]).
|
||||
components_established(info);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
OBJ_ADAPTER oa = new OBJ_ADAPTER("components_established failed");
|
||||
oa.initCause(exc);
|
||||
oa.minor = 6 | OMGVMCID.value;
|
||||
throw oa;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ exception statement from your version. */
|
||||
package gnu.CORBA.Interceptor;
|
||||
|
||||
import gnu.CORBA.Poa.ORB_1_4;
|
||||
import gnu.CORBA.ObjectCreator;
|
||||
import gnu.CORBA.gnuCodecFactory;
|
||||
|
||||
import org.omg.CORBA.BAD_INV_ORDER;
|
||||
@@ -87,7 +88,7 @@ public class Registrator extends LocalObject implements ORBInitInfo
|
||||
/**
|
||||
* The agreed properties prefix.
|
||||
*/
|
||||
public final static String m_prefix =
|
||||
public static final String m_prefix =
|
||||
"org.omg.PortableInterceptor.ORBInitializerClass.";
|
||||
|
||||
/**
|
||||
@@ -182,7 +183,8 @@ public class Registrator extends LocalObject implements ORBInitInfo
|
||||
try
|
||||
{
|
||||
String cn = sk.substring(m_prefix.length());
|
||||
Class iClass = Class.forName(cn);
|
||||
Class iClass = ObjectCreator.forName(cn);
|
||||
|
||||
ORBInitializer initializer =
|
||||
(ORBInitializer) iClass.newInstance();
|
||||
m_initializers.add(initializer);
|
||||
@@ -467,4 +469,4 @@ public class Registrator extends LocalObject implements ORBInitInfo
|
||||
{
|
||||
return m_ior.size() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ exception statement from your version. */
|
||||
|
||||
package gnu.CORBA.Interceptor;
|
||||
|
||||
import gnu.CORBA.CDR.cdrBufOutput;
|
||||
import gnu.CORBA.CDR.BufferedCdrOutput;
|
||||
import gnu.CORBA.Poa.ORB_1_4;
|
||||
|
||||
import org.omg.CORBA.Any;
|
||||
@@ -198,7 +198,7 @@ public class gnuIcCurrent extends ObjectImpl implements Current
|
||||
Any[] r = get_slots();
|
||||
Any[] copy = new Any[ r.length ];
|
||||
|
||||
cdrBufOutput buf = new cdrBufOutput();
|
||||
BufferedCdrOutput buf = new BufferedCdrOutput();
|
||||
buf.setOrb(orb);
|
||||
|
||||
for (int i = 0; i < copy.length; i++)
|
||||
|
||||
@@ -40,12 +40,14 @@ package gnu.CORBA.Interceptor;
|
||||
|
||||
import gnu.CORBA.IOR;
|
||||
import gnu.CORBA.Poa.ORB_1_4;
|
||||
import gnu.CORBA.Poa.gnuPOA;
|
||||
|
||||
import org.omg.CORBA.LocalObject;
|
||||
import org.omg.CORBA.Policy;
|
||||
import org.omg.IOP.TaggedComponent;
|
||||
import org.omg.PortableInterceptor.IORInfo;
|
||||
import org.omg.PortableServer.POA;
|
||||
import org.omg.PortableInterceptor.ObjectReferenceFactory;
|
||||
import org.omg.PortableInterceptor.ObjectReferenceTemplate;
|
||||
|
||||
/**
|
||||
* Implements IORInfo.
|
||||
@@ -67,7 +69,7 @@ public class gnuIorInfo extends LocalObject implements IORInfo
|
||||
/**
|
||||
* The POA, to that IOR is related.
|
||||
*/
|
||||
public final POA poa;
|
||||
public final gnuPOA poa;
|
||||
|
||||
/**
|
||||
* The IOR itself.
|
||||
@@ -77,7 +79,7 @@ public class gnuIorInfo extends LocalObject implements IORInfo
|
||||
/**
|
||||
* Create an instance.
|
||||
*/
|
||||
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)
|
||||
{
|
||||
orb = an_orb;
|
||||
poa = a_poa;
|
||||
@@ -113,8 +115,42 @@ public class gnuIorInfo extends LocalObject implements IORInfo
|
||||
/**
|
||||
* Return the state of the object POA.
|
||||
*/
|
||||
short state()
|
||||
public short state()
|
||||
{
|
||||
return (short) poa.the_POAManager().get_state().value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the adapter template, associated with this poa.
|
||||
*/
|
||||
public ObjectReferenceTemplate adapter_template()
|
||||
{
|
||||
return poa.getReferenceTemplate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object factory of the current POA.
|
||||
*/
|
||||
public ObjectReferenceFactory current_factory()
|
||||
{
|
||||
return poa.getReferenceFactory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the object factory of the current POA.
|
||||
*/
|
||||
public void current_factory(ObjectReferenceFactory factory)
|
||||
{
|
||||
poa.setReferenceFactory(factory);
|
||||
}
|
||||
|
||||
/**
|
||||
* The method currently uses system identity hashcode that should be
|
||||
* different for each object.
|
||||
*/
|
||||
public int manager_id()
|
||||
{
|
||||
// The System.identityHashCode is also called in gnuPoaManager.
|
||||
return System.identityHashCode(poa.the_POAManager());
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,7 @@ import gnu.CORBA.GIOP.ReplyHeader;
|
||||
import gnu.CORBA.GIOP.RequestHeader;
|
||||
import gnu.CORBA.ObjectCreator;
|
||||
import gnu.CORBA.Poa.gnuServantObject;
|
||||
import gnu.CORBA.OrbFunctional;
|
||||
import gnu.CORBA.Unexpected;
|
||||
import gnu.CORBA.gnuRequest;
|
||||
|
||||
@@ -453,4 +454,23 @@ public class gnuServerRequestInfo extends LocalObject
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public String[] adapter_name()
|
||||
{
|
||||
return m_object.poa.getReferenceTemplate().adapter_name();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public String orb_id()
|
||||
{
|
||||
return m_object.orb.orb_id;
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public String server_id()
|
||||
{
|
||||
return OrbFunctional.server_id;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user