Examples of RemoteRef


Examples of java.rmi.server.RemoteRef

  try {
      RemoteObject stub = (RemoteObject)
    LocateRegistry.getRegistry(ActivationSystem.SYSTEM_PORT);
      Method method =
    Registry.class.getMethod("lookup", new Class[]{String.class});
      RemoteRef ref = stub.getRef();
      try {
    // call lookup() on the registry ref with a Foo
    ref.invoke(stub, method, new Object[]{foo}, LOOKUP);
    throw new RuntimeException("lookup did not fail");
      } catch (ServerException e) {
    check(e);
      }
  } finally {
View Full Code Here

Examples of java.rmi.server.RemoteRef

public static Registry getRegistry(String host, int port) throws RemoteException {
  return (getRegistry(host, port, RMISocketFactory.getSocketFactory()));
}

public static Registry getRegistry(String host, int port, RMIClientSocketFactory csf) throws RemoteException {
  RemoteRef ref = new UnicastRef(new ObjID(ObjID.REGISTRY_ID), host, port, csf);
  return (new RegistryImpl_Stub(ref));
}
View Full Code Here

Examples of java.rmi.server.RemoteRef

        }

        // Check RemoteRef in stub is from the expected class
        // "sun.rmi.server.UnicastRef2".
        //
        RemoteRef ref = ((RemoteObject)stub).getRef();
        if (ref.getClass() != UnicastRef2.class)
            throw new SecurityException(
                      "Expecting a " + UnicastRef2.class.getName() +
                      " remote reference in stub!");

        // Check RMIClientSocketFactory in stub is from the expected class
View Full Code Here

Examples of java.rmi.server.RemoteRef

    private static RMIConnection shadowJrmpStub(RemoteObject stub)
            throws InstantiationException, IllegalAccessException,
                   InvocationTargetException, ClassNotFoundException,
                   NoSuchMethodException {
        RemoteRef ref = stub.getRef();
        RemoteRef proxyRef = (RemoteRef)
            proxyRefConstructor.newInstance(new Object[] {ref});
        final Class[] constrTypes = {RemoteRef.class};
        final Constructor rmiConnectionImplStubConstructor =
            rmiConnectionImplStubClass.getConstructor(constrTypes);
        Object[] args = {proxyRef};
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.