Package javax.rmi.CORBA

Examples of javax.rmi.CORBA.Tie


        if ( obj instanceof Stub )
        {
            return obj;
        }

        Tie tie = null;
        if ( obj instanceof Tie )
        {
            tie = ( Tie ) obj;
            obj = tie.getTarget();
        }
        else
        {
            tie = Util.getTie( obj );
        }
        if ( tie == null )
        {
            throw new java.rmi.NoSuchObjectException( "Object not exported" );
        }

        final org.omg.CORBA.portable.ObjectImpl thisObject = (ObjectImpl) tie.thisObject();
        final String[] ids = thisObject._ids();

        for (int i = 0; i < ids.length; ++i)
        {
            final String repoID = ids[i];
View Full Code Here


     * @param obj   The RMI object
     * @see javax.rmi.CORBA.PortableRemoteObjectDelegate#unexportObject(java.rmi.Remote)
     */
    public void unexportObject( java.rmi.Remote obj ) throws java.rmi.NoSuchObjectException
    {
        Tie tie = Util.getTie( obj );
        if ( tie == null )
        {
            throw new java.rmi.NoSuchObjectException( "Object not exported" );
        }
        Util.unexportObject( obj );
View Full Code Here

        if ( obj instanceof Stub )
        {
            throw new java.rmi.server.ExportException( "Attempted to export a stub class" );
        }
        Tie tie = Util.getTie( obj );
        if ( tie != null )
        {
            throw new java.rmi.server.ExportException( "Object already exported" );
        }
        tie = toTie( obj );
        tie.orb( getORB() );
        Util.registerTarget( tie, obj );
    }
View Full Code Here

        if ( obj instanceof Stub )
        {
            return obj;
        }

        Tie tie = null;
        if ( obj instanceof Tie )
        {
            tie = ( Tie ) obj;
            obj = tie.getTarget();
        }
        else
        {
            tie = Util.getTie( obj );
        }
        if ( tie == null )
        {
            throw new java.rmi.NoSuchObjectException( "Object not exported" );
        }

        final org.omg.CORBA.portable.ObjectImpl thisObject = (ObjectImpl) tie.thisObject();
        final String[] ids = thisObject._ids();

        for (int i = 0; i < ids.length; ++i)
        {
            final String repoID = ids[i];
View Full Code Here

     * @param obj   The RMI object
     * @see javax.rmi.CORBA.PortableRemoteObjectDelegate#unexportObject(java.rmi.Remote)
     */
    public void unexportObject( java.rmi.Remote obj ) throws java.rmi.NoSuchObjectException
    {
        Tie tie = Util.getTie( obj );
        if ( tie == null )
        {
            throw new java.rmi.NoSuchObjectException( "Object not exported" );
        }
        Util.unexportObject( obj );
View Full Code Here

        }
    }

    public Tie getTie(final Class<?> cls) {
        try {
            Tie tie = staticFactory.getTie(cls);
            if (tie != null) {
                return tie;
            }
        } catch (Exception e) {
View Full Code Here

     */
    public void unexportObject(java.rmi.Remote target)
        throws java.rmi.NoSuchObjectException
    {
        synchronized (exportedServants) {
            Tie cachedTie = lookupTie(target);
            if (cachedTie != null) {
                exportedServants.remove(target);
                Utility.purgeStubForTie(cachedTie);
                Utility.purgeTieAndServant(cachedTie);
                try {
View Full Code Here

    /**
     * An unsynchronized version of getTie() for internal use.
     */
    private static Tie lookupTie (Remote target)
    {
        Tie result = (Tie)exportedServants.get(target);
        if (result == null && target instanceof Tie) {
            if (exportedServants.contains(target)) {
                result = (Tie)target;
            }
        }
View Full Code Here

                    } else {
                        throw new IOException("Unkown primitive type: " + clazz);
                    }
                } else {
                    if (obj instanceof PortableRemoteObject && obj instanceof Remote) {
                        final Tie tie = javax.rmi.CORBA.Util.getTie((Remote) obj);
                        if (tie == null) {
                            throw new IOException("Unable to serialize PortableRemoteObject; object has not been exported: " + obj);
                        }
                        final ORB orb = getORB();
                        tie.orb(orb);
                        obj = PortableRemoteObject.toStub((Remote) obj);
                    }
                    out.write(OBJECT);
                    out.writeObject(clazz);
                    out.writeObject(obj);
View Full Code Here

        if ( obj instanceof Stub )
        {
            throw new java.rmi.server.ExportException( "Attempted to export a stub class" );
        }
        Tie tie = Util.getTie( obj );
        if ( tie != null )
        {
            throw new java.rmi.server.ExportException( "Object already exported" );
        }
        tie = toTie( obj );
        tie.orb( getORB() );
        Util.registerTarget( tie, obj );
    }
View Full Code Here

TOP

Related Classes of javax.rmi.CORBA.Tie

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.