gnu.CORBA

Class ResponseHandlerImpl

Implemented Interfaces:
ResponseHandler

public class ResponseHandlerImpl
extends Object
implements ResponseHandler

Provides the CDR output streams for writing the response to the given buffer.

Field Summary

MessageHeader
message_header
The message header.
ORB
orb
The associated orb.
ReplyHeader
reply_header
The reply header.
RequestHeader
request_header
The request header.

Method Summary

OutputStream
createExceptionReply()
Get an output stream for providing details about the exception.
OutputStream
createReply()
Get an output stream for writing a regular reply (not an exception).
BufferedCdrOutput
getBuffer()
Get the buffer, normally containing the written reply.
boolean
isExceptionReply()
True if the stream was obtained by invoking createExceptionReply(), false otherwise (usually no-exception reply).

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

message_header

public final MessageHeader message_header
The message header. This field is used to compute the size and alignments. It is, however, never directly written to the buffer stream.

orb

public final ORB orb
The associated orb.

reply_header

public final ReplyHeader reply_header
The reply header.

request_header

public final RequestHeader request_header
The request header.

Method Details

createExceptionReply

public OutputStream createExceptionReply()
Get an output stream for providing details about the exception. Before returning the stream, the handler automatically writes the message header and the reply about exception header, but not the message header.
Specified by:
createExceptionReply in interface ResponseHandler
Returns:
the stream to write exception details into.

createReply

public OutputStream createReply()
Get an output stream for writing a regular reply (not an exception). Before returning the stream, the handler automatically writes the regular reply header, but not the message header.
Specified by:
createReply in interface ResponseHandler
Returns:
the output stream for writing a regular reply.

getBuffer

public BufferedCdrOutput getBuffer()
Get the buffer, normally containing the written reply. The reply includes the reply header (or the exception header) but does not include the message header. The stream buffer can also be empty if no data have been written into streams, returned by createReply() or createExceptionReply().
Returns:
the CDR output stream, containing the written output.

isExceptionReply

public boolean isExceptionReply()
True if the stream was obtained by invoking createExceptionReply(), false otherwise (usually no-exception reply).

ResponseHandlerImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath 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 for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.