001 /* ForwardRequest.java -- 002 Copyright (C) 2005, 2006 Free Software Foundation, Inc. 003 004 This file is part of GNU Classpath. 005 006 GNU Classpath is free software; you can redistribute it and/or modify 007 it under the terms of the GNU General Public License as published by 008 the Free Software Foundation; either version 2, or (at your option) 009 any later version. 010 011 GNU Classpath is distributed in the hope that it will be useful, but 012 WITHOUT ANY WARRANTY; without even the implied warranty of 013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 General Public License for more details. 015 016 You should have received a copy of the GNU General Public License 017 along with GNU Classpath; see the file COPYING. If not, write to the 018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 019 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 020 02110-1301 USA. 021 022 023 Linking this library statically or dynamically with other modules is 024 making a combined work based on this library. Thus, the terms and 025 conditions of the GNU General Public License cover the whole 026 combination. 027 028 As a special exception, the copyright holders of this library give you 029 permission to link this library with independent modules to produce an 030 executable, regardless of the license terms of these independent 031 modules, and to copy and distribute the resulting executable under 032 terms of your choice, provided that you also meet, for each linked 033 independent module, the terms and conditions of the license of that 034 module. An independent module is a module which is not derived from 035 or based on this library. If you modify this library, you may extend 036 this exception to your version of the library, but you are not 037 obligated to do so. If you do not wish to do so, delete this 038 exception statement from your version. */ 039 040 041 package org.omg.PortableServer; 042 043 import org.omg.CORBA.UserException; 044 import org.omg.CORBA.portable.IDLEntity; 045 046 import java.io.Serializable; 047 048 /** 049 * <p> 050 * This exception is raised by {@link ServantManager} to indicate that the 051 * invocation target has moved to another known location. In this case, 052 * the client will receive a redirection (LOCATION_FORWARD) message and should 053 * resend the request to the new target. The exception contains the object 054 * reference, indicating the new location. 055 * </p><p> 056 * The exception can be thrown both by servant locators and servant activators. 057 * If the exception is raised anywhere else than in the ServantManager 058 * methods, it is handled as an ordinary user excepton. 059 * </p> 060 * 061 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) 062 */ 063 public final class ForwardRequest 064 extends UserException 065 implements IDLEntity, Serializable 066 { 067 /** 068 * Use serialVersionUID (v1.4) for interoperability. 069 */ 070 private static final long serialVersionUID = -4159318367582473975L; 071 072 /** 073 * The object reference, indicating the new location of the invocation target. 074 */ 075 public org.omg.CORBA.Object forward_reference; 076 077 /** 078 * Create ForwardRequest with no explaining message and stating the 079 * new location is <code>null</code>. 080 */ 081 public ForwardRequest() 082 { 083 } 084 085 /** 086 * Create the ForwardRequest with explaining message and 087 * initialising the object reference to the given value. 088 * 089 * @param why a string, explaining, why this exception has been thrown. 090 * @param a_forward_reference a value for forward_reference. 091 */ 092 public ForwardRequest(String why, org.omg.CORBA.Object a_forward_reference) 093 { 094 super(why); 095 this.forward_reference = a_forward_reference; 096 } 097 098 /** 099 * Create the ForwardRequest without explaining 100 * message and initialising the object reference to the given value. 101 * 102 * @param a_forward_reference a value for forward_reference. 103 */ 104 public ForwardRequest(org.omg.CORBA.Object a_forward_reference) 105 { 106 this.forward_reference = a_forward_reference; 107 } 108 }