Package com.zeroc.Ice

Class OutgoingResponse

java.lang.Object
com.zeroc.Ice.OutgoingResponse

public final class OutgoingResponse extends Object
Represents the response to an incoming request. It's returned by Object.dispatch(IncomingRequest).
  • Field Details

    • exceptionId

      public final String exceptionId
      The exception ID of the response.

      It's null when replyStatus is ReplyStatus.Ok or ReplyStatus.UserException. Otherwise, this ID is the value returned by LocalException.ice_id(). For other exceptions, this ID is the full name of the exception's type.

    • exceptionDetails

      public final String exceptionDetails
      The full details of the exception marshaled into the response.

      The exception details. It's null when replyStatus is ReplyStatus.Ok or ReplyStatus.UserException.

    • outputStream

      public final OutputStream outputStream
      The output stream buffer of the response. This output stream should not be written to after construction.
    • replyStatus

      public final int replyStatus
      The reply status of the response, as an int.
    • size

      public final int size
      The number of bytes in the response's payload.
  • Constructor Details

    • OutgoingResponse

      public OutgoingResponse(int replyStatus, String exceptionId, String exceptionDetails, OutputStream outputStream)
      Constructs an OutgoingResponse object.
      Parameters:
      replyStatus - the reply status, as an int
      exceptionId - the type ID of the exception, when the response carries an exception other than a user exception
      exceptionDetails - the full details of the exception, when the response carries an exception other than a user exception
      outputStream - the output stream that holds the response
      See Also:
    • OutgoingResponse

      public OutgoingResponse(OutputStream outputStream)
      Constructs an OutgoingResponse object with the ReplyStatus.Ok status.
      Parameters:
      outputStream - the output stream that holds the response