1 /* |
1 /* |
2 * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 package java.rmi.server; |
25 package java.rmi.server; |
26 |
26 |
27 /** |
27 /** |
28 * The <code>RemoteStub</code> class is the common superclass to client |
28 * The {@code RemoteStub} class is the common superclass of |
|
29 * statically generated client |
29 * stubs and provides the framework to support a wide range of remote |
30 * stubs and provides the framework to support a wide range of remote |
30 * reference semantics. Stub objects are surrogates that support |
31 * reference semantics. Stub objects are surrogates that support |
31 * exactly the same set of remote interfaces defined by the actual |
32 * exactly the same set of remote interfaces defined by the actual |
32 * implementation of the remote object. |
33 * implementation of the remote object. |
33 * |
34 * |
34 * @author Ann Wollrath |
35 * @author Ann Wollrath |
35 * @since JDK1.1 |
36 * @since JDK1.1 |
|
37 * |
|
38 * @deprecated Statically generated stubs are deprecated, since |
|
39 * stubs are generated dynamically. See {@link UnicastRemoteObject} |
|
40 * for information about dynamic stub generation. |
36 */ |
41 */ |
|
42 @Deprecated |
37 abstract public class RemoteStub extends RemoteObject { |
43 abstract public class RemoteStub extends RemoteObject { |
38 |
44 |
39 /** indicate compatibility with JDK 1.1.x version of class */ |
45 /** indicate compatibility with JDK 1.1.x version of class */ |
40 private static final long serialVersionUID = -1585587260594494182L; |
46 private static final long serialVersionUID = -1585587260594494182L; |
41 |
47 |
42 /** |
48 /** |
43 * Constructs a <code>RemoteStub</code>. |
49 * Constructs a {@code RemoteStub}. |
44 */ |
50 */ |
45 protected RemoteStub() { |
51 protected RemoteStub() { |
46 super(); |
52 super(); |
47 } |
53 } |
48 |
54 |
49 /** |
55 /** |
50 * Constructs a <code>RemoteStub</code>, with the specified remote |
56 * Constructs a {@code RemoteStub} with the specified remote |
51 * reference. |
57 * reference. |
52 * |
58 * |
53 * @param ref the remote reference |
59 * @param ref the remote reference |
54 * @since JDK1.1 |
60 * @since JDK1.1 |
55 */ |
61 */ |
56 protected RemoteStub(RemoteRef ref) { |
62 protected RemoteStub(RemoteRef ref) { |
57 super(ref); |
63 super(ref); |
58 } |
64 } |
59 |
65 |
60 /** |
66 /** |
61 * Sets the remote reference inside the remote stub. |
67 * Throws {@link UnsupportedOperationException}. |
62 * |
68 * |
63 * @param stub the remote stub |
69 * @param stub the remote stub |
64 * @param ref the remote reference |
70 * @param ref the remote reference |
|
71 * @throws UnsupportedOperationException always |
65 * @since JDK1.1 |
72 * @since JDK1.1 |
66 * @deprecated no replacement. The <code>setRef</code> method |
73 * @deprecated No replacement. The {@code setRef} method |
67 * is not needed since <code>RemoteStub</code>s can be created with |
74 * was intended for setting the remote reference of a remote |
68 * the <code>RemoteStub(RemoteRef)</code> constructor. |
75 * stub. This is unnecessary, since {@code RemoteStub}s can be created |
|
76 * and initialized with a remote reference through use of |
|
77 * the {@link #RemoteStub(RemoteRef)} constructor. |
69 */ |
78 */ |
70 @Deprecated |
79 @Deprecated |
71 protected static void setRef(RemoteStub stub, RemoteRef ref) { |
80 protected static void setRef(RemoteStub stub, RemoteRef ref) { |
72 throw new UnsupportedOperationException(); |
81 throw new UnsupportedOperationException(); |
73 } |
82 } |