예제 #1
0
 /**
  * Called whenever an ORB instance is created. This registers the transport endpoints and the ORB
  * proxy callback object. Note that we cannot detect when an ORB shuts down, although all of the
  * POA shutdowns should still be reported.
  */
 public void registerORB(
     String serverId,
     String orbId,
     com.sun.corba.se.PortableActivationIDL.ORBProxy orb,
     com.sun.corba.se.PortableActivationIDL.EndPointInfo[] endPointInfo)
     throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered,
         com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint,
         com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegistered {
   org.omg.CORBA.portable.InputStream $in = null;
   try {
     org.omg.CORBA.portable.OutputStream $out = _request("registerORB", true);
     org.omg.PortableInterceptor.ServerIdHelper.write($out, serverId);
     org.omg.PortableInterceptor.ORBIdHelper.write($out, orbId);
     com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.write($out, orb);
     com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.write($out, endPointInfo);
     $in = _invoke($out);
     return;
   } catch (org.omg.CORBA.portable.ApplicationException $ex) {
     $in = $ex.getInputStream();
     String _id = $ex.getId();
     if (_id.equals("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read($in);
     else if (_id.equals("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read($in);
     else if (_id.equals("IDL:PortableActivationIDL/ORBAlreadyRegistered:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegisteredHelper.read($in);
     else throw new org.omg.CORBA.MARSHAL(_id);
   } catch (org.omg.CORBA.portable.RemarshalException $rm) {
     registerORB(serverId, orbId, orb, endPointInfo);
   } finally {
     _releaseReply($in);
   }
 } // registerORB
예제 #2
0
 /**
  * locate server - returns the port with a specific type for all registered ORBs of an active
  * server. Starts the server if it is not already running.
  */
 public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType locateServer(
     String serverId, String endPoint)
     throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint,
         com.sun.corba.se.PortableActivationIDL.ServerNotRegistered,
         com.sun.corba.se.PortableActivationIDL.ServerHeldDown {
   org.omg.CORBA.portable.InputStream $in = null;
   try {
     org.omg.CORBA.portable.OutputStream $out = _request("locateServer", true);
     org.omg.PortableInterceptor.ServerIdHelper.write($out, serverId);
     $out.write_string(endPoint);
     $in = _invoke($out);
     com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType $result =
         com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerTypeHelper.read(
             $in);
     return $result;
   } catch (org.omg.CORBA.portable.ApplicationException $ex) {
     $in = $ex.getInputStream();
     String _id = $ex.getId();
     if (_id.equals("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read($in);
     else if (_id.equals("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read($in);
     else if (_id.equals("IDL:PortableActivationIDL/ServerHeldDown:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read($in);
     else throw new org.omg.CORBA.MARSHAL(_id);
   } catch (org.omg.CORBA.portable.RemarshalException $rm) {
     return locateServer(serverId, endPoint);
   } finally {
     _releaseReply($in);
   }
 } // locateServer
예제 #3
0
 /** Useful from external BadServerIdHandlers which need to pick a particular port type. */
 public int getServerPortForType(
     com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB location,
     String endPointType)
     throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint {
   org.omg.CORBA.portable.InputStream $in = null;
   try {
     org.omg.CORBA.portable.OutputStream $out = _request("getServerPortForType", true);
     com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.write(
         $out, location);
     $out.write_string(endPointType);
     $in = _invoke($out);
     int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read($in);
     return $result;
   } catch (org.omg.CORBA.portable.ApplicationException $ex) {
     $in = $ex.getInputStream();
     String _id = $ex.getId();
     if (_id.equals("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
       throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read($in);
     else throw new org.omg.CORBA.MARSHAL(_id);
   } catch (org.omg.CORBA.portable.RemarshalException $rm) {
     return getServerPortForType(location, endPointType);
   } finally {
     _releaseReply($in);
   }
 } // getServerPortForType
예제 #4
0
 public void _read(org.omg.CORBA.portable.InputStream i) {
   value = com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read(i);
 }