Package java.rmi

Examples of java.rmi.Remote


      }
   }

   protected String encodeStub(RMIServerImpl rmiServer, Map environment) throws IOException
   {
      Remote stub = rmiServer.toStub();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = null;
      try
      {
         oos = new ObjectOutputStream(baos);
View Full Code Here


                logger.info("Get registry from " + registryHost + ":" + registryPort);
                reg = LocateRegistry.getRegistry(registryHost, registryPort);
            }
            JGDIRemoteFactoryImpl service = new JGDIRemoteFactoryImpl(sge_url);
            Thread.sleep(1000);
            Remote stub = (Remote)UnicastRemoteObject.exportObject(service, 0);
           
            reg.bind(serviceName, stub);
           
            logger.info("JGDIRemoteFactory bound to name " + serviceName );
           
View Full Code Here

    }

    public Remote getPort(QName qName, Class portClass) throws ServiceException {
        if (qName != null) {
            String portName = qName.getLocalPart();
            Remote port = internalGetPort(portName);
            return port;
        }
        return getPort(portClass);
    }
View Full Code Here

        return getPort(portClass);
    }

    public Remote getPort(Class portClass) throws ServiceException {
        String fqcn = portClass.getName();
        Remote port = internalGetPortFromClassName(fqcn);
        return port;
    }
View Full Code Here

    }

    Remote internalGetPort(String portName) throws ServiceException {
        if (portToImplementationMap.containsKey(portName)) {
            SEIFactory seiFactory = (SEIFactory) portToImplementationMap.get(portName);
            Remote port = seiFactory.createServiceEndpoint();
            return port;
        }
        throw new ServiceException("No port for portname: " + portName);
    }
View Full Code Here

    }

    Remote internalGetPortFromClassName(String className) throws ServiceException {
        if (seiClassNameToFactoryMap.containsKey(className)) {
            SEIFactory seiFactory = (SEIFactory) seiClassNameToFactoryMap.get(className);
            Remote port = seiFactory.createServiceEndpoint();
            return port;
        }
        throw new ServiceException("no port for class " + className);
    }
View Full Code Here

        // reconstruct the rmiURI now because values might have been changed
        rmiURI = "//" + rmiHost + ":" + rmiPort + "/" + rmiName;

        // try to create remote repository
        Remote remote;
        try {
            Class clazz = Class.forName(getRemoteFactoryDelegaterClass());
            RemoteFactoryDelegater rmf = (RemoteFactoryDelegater) clazz.newInstance();
            remote = rmf.createRemoteRepository(repository);
        } catch (RemoteException e) {
View Full Code Here

        // reconstruct the rmiURI now because values might have been changed
        rmiURI = "//" + rmiHost + ":" + rmiPort + "/" + rmiName;

        // try to create remote repository
        Remote remote;
        try {
            Class clazz = Class.forName(getRemoteFactoryDelegaterClass());
            RemoteFactoryDelegater rmf = (RemoteFactoryDelegater) clazz.newInstance();
            remote = rmf.createRemoteRepository(repository);
        } catch (RemoteException e) {
View Full Code Here

  if (orb == null)
      // Wrong kind of context, so just give up and let another StateFactory
      // try to satisfy getStateToBind.
      return null ;

  Remote stub = null;

  try {
      stub = PortableRemoteObject.toStub( (Remote)orig ) ;
  } catch (Exception exc) {
      // XXX log at FINE level?
View Full Code Here

      {
         storeLocalConfig(configuration);
         String host = locator.getHost();
         int port = getRegistryPort(locator);
         Registry regsitry = LocateRegistry.getRegistry(host, port);
         Remote remoteObj = regsitry.lookup("remoting/RMIServerInvoker/" + locator.getPort());
         log.debug("Remote RMI Stub: " + remoteObj);
         setServerStub((RMIServerInvokerInf) remoteObj);
         connected = true;
      }
      catch(Exception e)
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.