1 /*
2 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
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 *
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.
24 */
25
26 package java.rmi.activation;
27
28 /**
29 * <code>ActivationGroup_Stub</code> is a stub class
30 * for the subclasses of <code>java.rmi.activation.ActivationGroup</code>
31 * that are exported as a <code>java.rmi.server.UnicastRemoteObject</code>.
32 *
33 * @since 1.2
34 */
35 public final class ActivationGroup_Stub
36 extends java.rmi.server.RemoteStub
37 implements java.rmi.activation.ActivationInstantiator, java.rmi.Remote
38 {
39 /**
40 * Constructs a stub for the <code>ActivationGroup</code> class. It
41 * invokes the superclass <code>RemoteStub(RemoteRef)</code>
42 * constructor with its argument, <code>ref</code>.
43 *
44 * @param ref a remote ref
45 */
46 public ActivationGroup_Stub(java.rmi.server.RemoteRef ref) {
47 }
48
49 /**
50 * Stub method for <code>ActivationGroup.newInstance</code>. Invokes
51 * the <code>invoke</code> method on this instance's
52 * <code>RemoteObject.ref</code> field, with <code>this</code> as the
53 * first argument, a two-element <code>Object[]</code> as the second
54 * argument (with <code>id</code> as the first element and
55 * <code>desc</code> as the second element), and -5274445189091581345L
56 * as the third argument, and returns the result. If that invocation
57 * throws a <code>RuntimeException</code>, <code>RemoteException</code>,
58 * or an <code>ActivationException</code>, then that exception is
59 * thrown to the caller. If that invocation throws any other
60 * <code>java.lang.Exception</code>, then a
61 * <code>java.rmi.UnexpectedException</code> is thrown to the caller
62 * with the original exception as the cause.
63 *
64 * @param id an activation identifier
65 * @param desc an activation descriptor
66 * @return the result of the invocation
67 * @throws java.rmi.RemoteException if invocation results in
68 * a <code>RemoteException</code>
69 * @throws java.rmi.activation.ActivationException if invocation
70 * results in an <code>ActivationException</code>
71 */
72 public java.rmi.MarshalledObject newInstance(
73 java.rmi.activation.ActivationID id,
74 java.rmi.activation.ActivationDesc desc)
75 throws java.rmi.RemoteException,
76 java.rmi.activation.ActivationException
77 {
78 return null;
79 }
80 }
|
1 /*
2 * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
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 *
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.
24 */
25
26 package java.rmi.activation;
27
28 import java.rmi.Remote;
29 import java.rmi.RemoteException;
30 import java.rmi.server.RemoteObject;
31
32 /**
33 * {@code ActivationGroup_Stub} is a stub class for the subclasses of {@code ActivationGroup}
34 * that are exported as a {@code java.rmi.server.UnicastRemoteObject}.
35 *
36 * @since 1.2
37 */
38 @SuppressWarnings({"rawtypes", "unchecked", "deprecation"})
39 public final class ActivationGroup_Stub
40 extends java.rmi.server.RemoteStub
41 implements ActivationInstantiator, Remote {
42 private static final long serialVersionUID = 2;
43
44 private static java.lang.reflect.Method $method_newInstance_0;
45
46 static {
47 try {
48 $method_newInstance_0 =
49 ActivationInstantiator.class.getMethod("newInstance",
50 new java.lang.Class<?>[] {ActivationID.class, ActivationDesc.class});
51 } catch (java.lang.NoSuchMethodException e) {
52 throw new java.lang.NoSuchMethodError(
53 "stub class initialization failed");
54 }
55 }
56
57 /**
58 * Constructs a stub for the {@code ActivationGroup} class.
59 * It invokes the superclass {@code RemoteStub(RemoteRef)}
60 * constructor with its argument, {@code ref}.
61 *
62 * @param ref a remote ref
63 */
64 public ActivationGroup_Stub(java.rmi.server.RemoteRef ref) {
65 super(ref);
66 }
67
68 /**
69 * Stub method for {@code ActivationGroup.newInstance}. Invokes
70 * the {@code invoke} method on this instance's
71 * {@code RemoteObject.ref} field, with {@code this} as the
72 * first argument, a two-element {@code Object[]} as the second
73 * argument (with {@code id} as the first element and
74 * {@code desc} as the second element), and -5274445189091581345L
75 * as the third argument, and returns the result. If that invocation
76 * throws a {@code RuntimeException}, {@code RemoteException},
77 * or an {@code ActivationException}, then that exception is
78 * thrown to the caller. If that invocation throws any other
79 * {@code java.lang.Exception}, then a
80 * {@code java.rmi.UnexpectedException} is thrown to the caller
81 * with the original exception as the cause.
82 *
83 * @param id an activation identifier
84 * @param desc an activation descriptor
85 * @return the result of the invocation
86 * @throws RemoteException if invocation results in a {@code RemoteException}
87 * @throws ActivationException if invocation results in an {@code ActivationException}
88 */
89 public java.rmi.MarshalledObject newInstance(ActivationID id,
90 ActivationDesc desc)
91 throws java.rmi.RemoteException, ActivationException {
92 try {
93 Object $result = ref.invoke(this, $method_newInstance_0,
94 new java.lang.Object[]{id, desc}, -5274445189091581345L);
95 return ((java.rmi.MarshalledObject) $result);
96 } catch (java.lang.RuntimeException | java.rmi.RemoteException | ActivationException e) {
97 throw e;
98 } catch (java.lang.Exception e) {
99 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
100 }
101 }
102 }
|