Package java.rmi

Examples of java.rmi.Remote


        InteropTestPortType interopTestPort = interopLab.getinteropTestPort();
        assertNotNull(interopTestPort);
        testInteropPort(interopTestPort);

        //test more dynamically
        Remote sei = interopLab.getPort(InteropTestPortType.class);
        assertNotNull(sei);
        assertTrue(sei instanceof InteropTestPortType);
        testInteropPort((InteropTestPortType) sei);

        Remote sei2 = interopLab.getPort(new QName("http://tempuri.org/4s4c/1/3/wsdl/def/interopLab", "interopTestPort"), null);
        assertNotNull(sei2);
        assertTrue(sei2 instanceof InteropTestPortType);
        testInteropPort((InteropTestPortType) sei2);
    }
View Full Code Here


         int theport = (port == 0) ? 0 : port + i;
         handlers[i] = new RMIMultiSocketHandler(obj, invokerMap);
         stubs[i] = UnicastRemoteObject.exportObject(handlers[i], theport, csf, ssf);
      }

      Remote remote = (Remote)Proxy.newProxyInstance(
         obj.getClass().getClassLoader(),
         interfaces,
         new RMIMultiSocketClient(stubs));
      stubmap.put(remote, stubs);
      handlermap.put(remote, handlers);
View Full Code Here

            locator.setHomeInUse(home);
            storeLocalConfig(configuration);
            log.debug(this + " looking up registry: " + host + "," + port);
            Registry registry = LocateRegistry.getRegistry(host, registryPort);
            log.debug(this + " trying to connect to: " + home);
            Remote remoteObj = registry.lookup("remoting/RMIServerInvoker/" + port);
            log.debug("Remote RMI Stub: " + remoteObj);
            setServerStub((RMIServerInvokerInf) remoteObj);
            connected = true;
            break;
         }
View Full Code Here

   */
   protected Object replaceObject(Object obj) throws IOException
   {
      if( (obj instanceof Remote) && !(obj instanceof RemoteStub) )
      {
         Remote remote = (Remote) obj;
         try
         {
            obj = RemoteObject.toStub(remote);
         }
         catch(IOException ignore)
View Full Code Here

         int theport = (port == 0) ? 0 : port + i;
         handlers[i] = new RMIMultiSocketHandler(obj, invokerMap);
         stubs[i] = UnicastRemoteObject.exportObject(handlers[i], theport, csf, ssf);
      }

      Remote remote = (Remote)Proxy.newProxyInstance(
         obj.getClass().getClassLoader(),
         interfaces,
         new RMIMultiSocketClient(stubs));
      stubmap.put(remote, stubs);
      handlermap.put(remote, handlers);
View Full Code Here

    }

    public Remote findService(String uri) throws RMIHostException, RMIHostRuntimeException {
        RMIURI rmiURI = new RMIURI(uri);
       
        Remote remoteService = null;
        try {
            // Requires permission java.net.SocketPermission "host:port", "connect,accept,resolve"
            // in security policy.
            Registry registry = LocateRegistry.getRegistry(rmiURI.host, rmiURI.port);
View Full Code Here

 
  if (name.equals("setConstraints")) {
      if (Proxy.getInvocationHandler(proxy) != this) {
    throw new IllegalArgumentException("not proxy for this");
      }
      Remote newProxy;
      synchronized (this) {
    newProxy = uproxy;
      }
      MethodConstraints mc = (MethodConstraints) args[0];
      if (newProxy instanceof RemoteMethodControl) {
View Full Code Here

        new BasicMethodConstraints(absoluteConstraints);
      }
  }
 
  boolean force = false;
  Remote currProxy;
  Failure failure = null;
 
  /*
   * Attempt object activation if underlying proxy is unknown.
   */
  synchronized (this) {
      if (uproxy == null) {
    activate(force, proxy, method);
    force = true;
      }
      currProxy = uproxy;
  }
  
  for (int retries = MAX_RETRIES; --retries >= 0; ) {
      if (logger.isLoggable(Levels.HANDLED)) {
    if (failure != null) {
        logThrow(Levels.HANDLED, "outbound call",
           "invokeRemoteMethod",
           method, failure.exception);
    }
      }
     
      if ((clientConstraints != null) &&
    !(currProxy instanceof RemoteMethodControl))
      {
    throw new UnsupportedConstraintException(
         "underlying proxy does not implement RemoteMethodControl");
      }

      /*
       * Set constraints on target proxy only if relative constraints
       * were made absolute.
       */
      Remote targetProxy =
    (convertedConstraints == null ?
     currProxy :
     (Remote) ((RemoteMethodControl) currProxy).
     setConstraints(convertedConstraints));

View Full Code Here

       (clientConstraints == null ||
        !clientConstraints.equals(other.clientConstraints))))
  {
      return false;
  }
  Remote currProxy;
  synchronized (this) {
      currProxy = uproxy;
  }
  Remote otherProxy;
  synchronized (other) {
      otherProxy = other.uproxy;
  }
  if (currProxy == null || !(currProxy instanceof TrustEquivalence) ||
      !((TrustEquivalence) currProxy).checkTrustEquivalence(otherProxy))
View Full Code Here

    (ActivatableInvocationHandler) obj;
      if (!id.equals(handler.id)) {
    throw new ActivateFailedException("unexpected activation id");
      }
     
      Remote newUproxy = handler.uproxy;
      if (newUproxy == null) {
    throw new ActivateFailedException("null underlying proxy");
      } else if (newUproxy instanceof RemoteMethodControl) {
    newUproxy = (Remote) ((RemoteMethodControl) newUproxy).
            setConstraints(clientConstraints);
View Full Code Here

TOP

Related Classes of java.rmi.Remote

Copyright © 2018 www.massapicom. 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.