Package java.rmi

Examples of java.rmi.Remote


        if (csf != null || ssf != null) {
            sref = new UnicastServerRef2(port, csf, ssf);
        } else {
            sref = new UnicastServerRef(port, csf, ssf);
        }
        Remote stub = ExportManager.exportObject(obj, sref,
                useProxyStubs);

        if (obj instanceof UnicastRemoteObject) {
            ((UnicastRemoteObject) obj).ref = sref;
        }
View Full Code Here


                               boolean isSystem)
            throws RemoteException {
        this.isSystem = isSystem;
        ref = new RMIReference(obj);
        implClassName = obj.getClass().getName();
        Remote stub = null;

        // obtain class directly implementing Remote interface
        Class remoteClass = RMIUtil.getRemoteClass(obj.getClass());

        // load and instantiate skel class if any
View Full Code Here

            final Class aclass = RMIClassLoader.loadClass(adesc.getLocation(),
                    adesc.getClassName());
            // rmi.log.86=active class = {0}
            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.86", aclass)); //$NON-NLS-1$

            Remote rmt = (Remote) AccessController
                    .doPrivileged(new PrivilegedExceptionAction() {

                        public Object run() throws Exception {
                            Constructor aconstructor = aclass
                                    .getDeclaredConstructor(special_constructor_parameters);
                            // rmi.log.87=Activatable Constructor: {0}
                            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.87", aconstructor)); //$NON-NLS-1$

                            aconstructor.setAccessible(true);

                            Object parameters[] = new Object[] { aid,
                                    adesc.getData() };
                            return (Remote) aconstructor
                                    .newInstance(parameters);
                        }
                    });

            // rmi.log.88=rmt.getClass = {0}
            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.88", rmt.getClass())); //$NON-NLS-1$

            // rmi.log.89=newInstance: Remote Object = {0}
            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.89", rmt)); //$NON-NLS-1$

            ao = new ActiveObject(rmt);
View Full Code Here

            RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
            throws ActivationException, RemoteException {

        ActivationDesc adesc = new ActivationDesc(obj.getClass().getName(), location, data, restart);
        ActivationID aid = ActivationGroup.getSystem().registerObject(adesc);
        Remote stub = exportObject(obj, aid, port, csf, ssf);

        return aid;
    }
View Full Code Here

            throws ActivationException, RemoteException {

        ActivationDesc adesc = new ActivationDesc(robj.getClass().getName(),
                location, data, restart);
        ActivationID aid = ActivationGroup.getSystem().registerObject(adesc);
        Remote stub = exportObject(robj, aid, port);
        ActivationGroup curAG = ActivationGroup.getCurrentAG();
        // rmi.console.00=CurAG = {0}
        System.out.println(Messages.getString("rmi.console.00", curAG)); //$NON-NLS-1$
        curAG.activeObject(aid, robj);
View Full Code Here

        rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.11", asr)); //$NON-NLS-1$

        ExportManager.exportObject(robj, asr, false, true, true);
        // rmi.log.12=Activatable >>> asr after export: {0}
        rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.12", asr)); //$NON-NLS-1$
        Remote rmt = RemoteObject.toStub(robj);
        // rmi.log.13=Activatable.exportObject: stub = {0}
        rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.13", rmt)); //$NON-NLS-1$
        return rmt;
    }
View Full Code Here

        try {
            MarshalledObject stub = (MarshalledObject) activator.activate(this,
                    force);
            // rmi.log.01=ActivationID.activate:stub={0}
            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.01", stub)); //$NON-NLS-1$
            Remote deserialized_stub = (Remote) stub.get();
            // rmi.log.02=ActivationID.activate: deserialized_stub = {0}
            rlog.log(RMILog.VERBOSE,
                    Messages.getString("rmi.log.02", deserialized_stub)); //$NON-NLS-1$
            // rmi.log.03=<<<<<<<<< ActivationID.activate COMPLETED.
            rlog.log(RMILog.VERBOSE,Messages.getString("rmi.log.03")); //$NON-NLS-1$
View Full Code Here

            throws RemoteException {
        if (isExported(obj)) {
            // rmi.7B=Object {0} has already been exported.
            throw new ExportException(Messages.getString("rmi.7B", obj)); //$NON-NLS-1$
        }
        Remote stub = sref.exportObject(obj, null, useProxyStubs, startListen,
                isSystem);
        RMIReference rref = new RMIReference(obj, dgcQueue);
        RMIObjectInfo info = new RMIObjectInfo(
                rref, sref.getObjId(), sref, stub);
        exportedObjs.add(info);
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

   * @see #lookupStub
   */
  public void prepare() throws RemoteLookupFailureException {
    // Cache RMI stub on initialization?
    if (this.lookupStubOnStartup) {
      Remote remoteObj = lookupStub();
      if (logger.isDebugEnabled()) {
        if (remoteObj instanceof RmiInvocationHandler) {
          logger.debug("RMI stub [" + getServiceUrl() + "] is an RMI invoker");
        }
        else if (getServiceInterface() != null) {
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.