/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
class LocalServerResponseImpl
extends IIOPOutputStream
implements ServerResponse
{
{
this(request,
null);
}
boolean user)
{
this(request,
null);
}
{
super(request.getGIOPVersion(),
null,
if( request.executePIInResponseConstructor() ) {
// Invoke server request ending interception points (send_*):
// Note: this may end up with a SystemException or an internal
// Runtime ForwardRequest.
// Note this will be executed even if a ForwardRequest or
// SystemException is thrown by a Portable Interceptors ending
// point since we end up in this constructor again anyway.
// See (Local)ServerRequestImpl.createSystemExceptionResponse
// for why this is necesary.
}
// Once you get here then the final reply is available (i.e.,
// postinvoke and interceptors have completed.
}
}
public boolean isSystemException() {
return false;
}
public boolean isUserException() {
return false;
}
public boolean isLocationForward() {
return true;
return false;
}
public IOR getForwardedIOR() {
return ior;
}
public int getRequestId() {
return reply.getRequestId();
return -1;
}
public ServiceContexts getServiceContexts() {
return reply.getServiceContexts();
return null;
}
public SystemException getSystemException() {
return reply.getSystemException();
return null;
}
public ReplyMessage getReply()
{
return reply ;
}
public ClientResponse getClientResponse()
{
// set the size of the marshalled data in the message header
// Construct a new ClientResponse out of the buffer in this ClientRequest
// NOTE (Ram J) (06/02/2000) if we set result.setIndex(bodyBegin) here
// then the LocalClientResponse does not need to read the headers anymore.
// This will be an optimisation which is can be done to speed up the
// local invocation by avoiding reading the headers in the local cases.
// BUGFIX(Ram Jeyaraman) result.setOffset is now done in
// LocalClientResponseImpl constructor.
/*
// Skip over all of the GIOP header information. This positions
// the offset in the buffer so that the skeleton can correctly read
// the marshalled arguments.
result.setOffset( bodyBegin ) ;
*/
return result ;
}
/**
* Check to see if the response is local.
*/
public boolean isLocal(){
return true;
}
private ReplyMessage reply;
}