Package java.rmi.server

Examples of java.rmi.server.ObjID


        {
            /* Server ref must be created and assigned before remote object
             * 'this' can be exported.
             */
            LiveRef lref =
                new LiveRef(new ObjID(ObjID.ACTIVATOR_ID), port, null, ssf);
            UnicastServerRef uref = new UnicastServerRef(lref);
            ref = uref;
            uref.exportObject(this, null, false);
        }
View Full Code Here


            throws RemoteException
        {
            /* Server ref must be created and assigned before remote object
             * 'this' can be exported.
             */
            LiveRef lref = new LiveRef(new ObjID(4), port, null, ssf);
            UnicastServerRef uref = new UnicastServerRef(lref);
            ref = uref;
            uref.exportObject(this, null);
        }
View Full Code Here

    /**
     * Construct a new live reference for a server object in the local
     * address space.
     */
    public LiveRef(int port) {
        this((new ObjID()), port);
    }
View Full Code Here

     */
    public LiveRef(int port,
                   RMIClientSocketFactory csf,
                   RMIServerSocketFactory ssf)
    {
        this((new ObjID()), port, csf, ssf);
    }
View Full Code Here

    public static LiveRef read(ObjectInput in, boolean useNewFormat)
        throws IOException, ClassNotFoundException
    {
        Endpoint ep;
        ObjID id;

        // Now read in the endpoint, id, and result flag
        // (need to choose whether or not to read old JDK1.1 endpoint format)
        if (useNewFormat) {
            ep = TCPEndpoint.read(in);
View Full Code Here

     **/
    ObjectEndpoint(ObjID id, Transport transport) {
        if (id == null) {
            throw new NullPointerException();
        }
        assert transport != null || id.equals(new ObjID(ObjID.DGC_ID));

        this.id = id;
        this.transport = transport;
    }
View Full Code Here

     */
    public boolean serviceCall(final RemoteCall call) {
        try {
            /* read object id */
            final Remote impl;
            ObjID id;

            try {
                id = ObjID.read(call.getInputStream());
            } catch (java.io.IOException e) {
                throw new MarshalException("unable to read objID", e);
            }

            /* get the remote object */
            Transport transport = id.equals(dgcID) ? null : this;
            Target target =
                ObjectTable.getTarget(new ObjectEndpoint(id, transport));

            if (target == null || (impl = target.getImpl()) == null) {
                throw new NoSuchObjectException("no such object in table");
View Full Code Here

        Registry testImpl = LocateRegistry.createRegistry(PORT);
        System.err.println("created test registry on port " + PORT);

        RemoteRef ref = new UnicastRef(
            new LiveRef(new ObjID(ObjID.REGISTRY_ID),
                        new TCPEndpoint("", PORT), false));
        Registry referenceStub = new ReferenceRegistryStub(ref);
        System.err.println("created reference registry stub: " +
                           referenceStub);
View Full Code Here

        final long[] objnums = new long[COUNT];
        for (int i = 0; i < COUNT; i++) {
            final int j = i;
            class Escape extends RuntimeException { }
            try {
                new ObjID().write(new ObjectOutputStream(new OutputStream() {
                    public void write(int b) { }
                }) {
                    public void writeLong(long val) throws IOException {
                        objnums[j] = val;
                        throw new Escape();
View Full Code Here

    /** Return if the stream is closed */
    protected boolean isClosed;

    public RemoteScrollableCursor(ScrollableCursor serverScrollableCursor) {
        this.id = new ObjID();
        this.isClosed = serverScrollableCursor.isClosed();
    }
View Full Code Here

TOP

Related Classes of java.rmi.server.ObjID

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.