|
Java example source code file (Stub.java)
The Stub.java Java example source code
/*
* Copyright (c) 1998, 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 javax.rmi.CORBA;
import org.omg.CORBA.ORB;
import org.omg.CORBA.INITIALIZE;
import org.omg.CORBA_2_3.portable.ObjectImpl;
import java.io.IOException;
import java.rmi.RemoteException;
import java.io.File;
import java.io.FileInputStream;
import java.net.MalformedURLException ;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Properties;
import java.rmi.server.RMIClassLoader;
import com.sun.corba.se.impl.orbutil.GetPropertyAction;
/**
* Base class from which all RMI-IIOP stubs must inherit.
*/
public abstract class Stub extends ObjectImpl
implements java.io.Serializable {
private static final long serialVersionUID = 1087775603798577179L;
// This can only be set at object construction time (no sync necessary).
private transient StubDelegate stubDelegate = null;
private static Class stubDelegateClass = null;
private static final String StubClassKey = "javax.rmi.CORBA.StubClass";
static {
Object stubDelegateInstance = createDelegate(StubClassKey);
if (stubDelegateInstance != null)
stubDelegateClass = stubDelegateInstance.getClass();
}
/**
* 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() {
if (stubDelegate == null) {
setDefaultDelegate();
}
if (stubDelegate != null) {
return stubDelegate.hashCode(this);
}
return 0;
}
/**
* 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 Stub.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.