1 /* ForwardRequest.java --
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 Linking this library statically or dynamically with other modules is
24 making a combined work based on this library. Thus, the terms and
25 conditions of the GNU General Public License cover the whole
28 As a special exception, the copyright holders of this library give you
29 permission to link this library with independent modules to produce an
30 executable, regardless of the license terms of these independent
31 modules, and to copy and distribute the resulting executable under
32 terms of your choice, provided that you also meet, for each linked
33 independent module, the terms and conditions of the license of that
34 module. An independent module is a module which is not derived from
35 or based on this library. If you modify this library, you may extend
36 this exception to your version of the library, but you are not
37 obligated to do so. If you do not wish to do so, delete this
38 exception statement from your version. */
41 package org
.omg
.PortableServer
;
43 import org
.omg
.CORBA
.UserException
;
44 import org
.omg
.CORBA
.portable
.IDLEntity
;
46 import java
.io
.Serializable
;
50 * This exception is raised by {@link ServantManager} to indicate that the
51 * invocation target has moved to another known location. In this case,
52 * the client will receive a redirection (LOCATION_FORWARD) message and should
53 * resend the request to the new target. The exception contains the object
54 * reference, indicating the new location.
56 * The exception can be thrown both by servant locators and servant activators.
57 * If the exception is raised anywhere else than in the ServantManager
58 * methods, it is handled as an ordinary user excepton.
61 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
63 public class ForwardRequest
65 implements IDLEntity
, Serializable
68 * Use serialVersionUID (v1.4) for interoperability.
70 private static final long serialVersionUID
= -4159318367582473975L;
73 * The object reference, indicating the new location of the invocation target.
75 public org
.omg
.CORBA
.Object forward_reference
;
78 * Create ForwardRequest with no explaining message and stating the
79 * new location is <code>null</code>.
81 public ForwardRequest()
86 * Create the ForwardRequest with explaining message and
87 * initialising the object reference to the given value.
89 * @param why a string, explaining, why this exception has been thrown.
90 * @param a_forward_reference a value for forward_reference.
92 public ForwardRequest(String why
, org
.omg
.CORBA
.Object a_forward_reference
)
95 this.forward_reference
= a_forward_reference
;
99 * Create the ForwardRequest without explaining
100 * message and initialising the object reference to the given value.
102 * @param a_forward_reference a value for forward_reference.
104 public ForwardRequest(org
.omg
.CORBA
.Object a_forward_reference
)
106 this.forward_reference
= a_forward_reference
;