4
|
1 |
/*
|
5555
|
2 |
* Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
|
4
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
5555
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
4
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5555
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
4
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
5555
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
4
|
24 |
*/
|
|
25 |
/*
|
|
26 |
* Licensed Materials - Property of IBM
|
|
27 |
* RMI-IIOP v1.0
|
|
28 |
* Copyright IBM Corp. 1998 1999 All Rights Reserved
|
|
29 |
*
|
|
30 |
*/
|
|
31 |
|
|
32 |
package javax.rmi.CORBA;
|
|
33 |
|
|
34 |
import java.io.IOException;
|
|
35 |
import java.io.ObjectInputStream;
|
|
36 |
import java.io.ObjectOutputStream;
|
|
37 |
import java.rmi.RemoteException;
|
|
38 |
import org.omg.CORBA.ORB;
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Supports delegation for method implementations in {@link Stub}.
|
|
42 |
* A delegate is an instance of a class that implements this
|
|
43 |
* interface and provides a replacement implementation for all the
|
|
44 |
* methods of <code>javax.rmi.CORBA.Stub</code>. If delegation is
|
|
45 |
* enabled, each stub has an associated delegate.
|
|
46 |
*
|
|
47 |
* Delegates are enabled by providing the delegate's class name as the
|
|
48 |
* value of the
|
|
49 |
* <code>javax.rmi.CORBA.StubClass</code>
|
|
50 |
* system property.
|
|
51 |
*
|
|
52 |
* @see Stub
|
|
53 |
*/
|
|
54 |
public interface StubDelegate {
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Delegation call for {@link Stub#hashCode}.
|
|
58 |
*/
|
|
59 |
int hashCode(Stub self);
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Delegation call for {@link Stub#equals}.
|
|
63 |
*/
|
|
64 |
boolean equals(Stub self, java.lang.Object obj);
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Delegation call for {@link Stub#toString}.
|
|
68 |
*/
|
|
69 |
String toString(Stub self);
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Delegation call for {@link Stub#connect}.
|
|
73 |
*/
|
|
74 |
void connect(Stub self, ORB orb)
|
|
75 |
throws RemoteException;
|
|
76 |
|
|
77 |
// _REVISIT_ cannot link to Stub.readObject directly... why not?
|
|
78 |
/**
|
|
79 |
* Delegation call for
|
|
80 |
* <a href="{@docRoot}/serialized-form.html#javax.rmi.CORBA.Stub"><code>Stub.readObject(java.io.ObjectInputStream)</code></a>.
|
|
81 |
*/
|
|
82 |
void readObject(Stub self, ObjectInputStream s)
|
|
83 |
throws IOException, ClassNotFoundException;
|
|
84 |
|
|
85 |
// _REVISIT_ cannot link to Stub.writeObject directly... why not?
|
|
86 |
/**
|
|
87 |
* Delegation call for
|
|
88 |
* <a href="{@docRoot}/serialized-form.html#javax.rmi.CORBA.Stub"><code>Stub.writeObject(java.io.ObjectOutputStream)</code></a>.
|
|
89 |
*/
|
|
90 |
void writeObject(Stub self, ObjectOutputStream s)
|
|
91 |
throws IOException;
|
|
92 |
|
|
93 |
}
|