Examples of Stub


Examples of javax.rmi.CORBA.Stub

        if (stubClass == EJBHome.class)
            return (EJBHome) PortableRemoteObject.narrow(obj, EJBHome.class);

        // Create the stub from the stub class
        try {
            final Stub stub = (Stub) stubClass.newInstance();
            stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate());
            return (EJBHome) stub;
        } catch (Exception e) {
            throw new RemoteException("Error creating stub", e);
        }
    }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

                    case L:
                        clazz = (Class) in.readObject();
                        obj = in.readObject();
                        if (obj instanceof Stub) {
                            Stub stub = (Stub)obj;
                            ORB orb = getORB();
                            stub.connect(orb);
                        }
                        break;
                    default:
                        throw new IOException("Unkown data type: " + type);
                }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

      return (RMIServer)PortableRemoteObject.narrow(stub, RMIServer.class);
   }

   public Object bindClient(Object client, Map environment) throws IOException
   {
      Stub stub = (Stub)client;
      ORB orb = null;
      try
      {
         orb = stub._orb();
      }
      catch (BAD_OPERATION x)
      {
         // The stub is not connected to an ORB, go on
      }

      if (orb == null)
      {
         orb = getORB(environment);
         stub.connect(orb);
      }
      return stub;
   }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

   }

   public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
   {
      RMIServerImpl rmiServer = (RMIServerImpl)server;
      Stub stub = (Stub)PortableRemoteObject.toStub(rmiServer);
      stub.connect(getORB(environment));
      return super.bindServer(server, url, environment);
   }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

      return super.bindServer(server, url, environment);
   }

   protected String encodeStub(RMIServerImpl rmiServer, Map environment) throws IOException
   {
      Stub stub = (Stub)bindClient(rmiServer.toStub(), environment);
      String ior = getORB(environment).object_to_string(stub);
      return IOR_CONTEXT + ior;
   }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

  proxyStubClass = stubClass;
    }

    private static RMIConnection shadowIiopStub(Stub stub)
      throws InstantiationException, IllegalAccessException {
  Stub proxyStub = (Stub) proxyStubClass.newInstance();
  proxyStub._set_delegate(stub._get_delegate());
  return (RMIConnection) proxyStub;
    }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

            RMIStub stub = (RMIStub) val;
            Class type = stub._descriptor.getJavaClass();

            RMIState state = RMIState.current();
            Stub result = state.getStaticStub(stub._get_codebase(), type);
            if (result != null) {
                result._set_delegate(stub._get_delegate());

                // System.out.println("replacing with stub "+result.getClass());

                return result;
            }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

      return (RMIServer)PortableRemoteObject.narrow(stub, RMIServer.class);
   }

   public Object bindClient(Object client, Map environment) throws IOException
   {
      Stub stub = (Stub)client;
      ORB orb = null;
      try
      {
         orb = stub._orb();
      }
      catch (BAD_OPERATION x)
      {
         // The stub is not connected to an ORB, go on
      }

      if (orb == null)
      {
         orb = getORB(environment);
         stub.connect(orb);
      }
      return stub;
   }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

   }

   public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
   {
      RMIServerImpl rmiServer = (RMIServerImpl)server;
      Stub stub = (Stub)PortableRemoteObject.toStub(rmiServer);
      stub.connect(getORB(environment));
      return super.bindServer(server, url, environment);
   }
View Full Code Here

Examples of javax.rmi.CORBA.Stub

      return super.bindServer(server, url, environment);
   }

   protected String encodeStub(RMIServerImpl rmiServer, Map environment) throws IOException
   {
      Stub stub = (Stub)bindClient(rmiServer.toStub(), environment);
      String ior = getORB(environment).object_to_string(stub);
      return IOR_CONTEXT + ior;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.