|
Java example source code file (StubDelegateImpl.java)
The StubDelegateImpl.java Java example source code/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* Licensed Materials - Property of IBM
* RMI-IIOP v1.0
* Copyright IBM Corp. 1998 1999 All Rights Reserved
*
*/
package com.sun.corba.se.impl.javax.rmi.CORBA;
import java.io.IOException;
import java.rmi.RemoteException;
import javax.rmi.CORBA.Tie;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.portable.Delegate;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.InputStream;
import com.sun.corba.se.spi.presentation.rmi.StubAdapter;
import com.sun.corba.se.spi.logging.CORBALogDomains ;
import com.sun.corba.se.impl.util.Utility;
import com.sun.corba.se.impl.ior.StubIORImpl ;
import com.sun.corba.se.impl.presentation.rmi.StubConnectImpl ;
import com.sun.corba.se.impl.logging.UtilSystemException ;
/**
* Base class from which all static RMI-IIOP stubs must inherit.
*/
public class StubDelegateImpl implements javax.rmi.CORBA.StubDelegate
{
static UtilSystemException wrapper = UtilSystemException.get(
CORBALogDomains.RMIIIOP ) ;
private StubIORImpl ior ;
public StubIORImpl getIOR()
{
return ior ;
}
public StubDelegateImpl()
{
ior = null ;
}
/**
* Sets the IOR components if not already set.
*/
private void init (javax.rmi.CORBA.Stub self)
{
// If the Stub is not connected to an ORB, BAD_OPERATION exception
// will be raised by the code below.
if (ior == null)
ior = new StubIORImpl( self ) ;
}
/**
* Returns a hash code value for the object which is the same for all stubs
* that represent the same remote object.
* @return the hash code value.
*/
public int hashCode(javax.rmi.CORBA.Stub self)
{
init(self);
return ior.hashCode() ;
}
/**
* Compares two stubs for equality. Returns <code>true when used to compare stubs
* that represent the same remote object, and <code>false otherwise.
* @param obj the reference object with which to compare.
* @return <code>true if this object is the same as the
Other Java examples (source code examples)Here is a short list of links related to this Java StubDelegateImpl.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.