/** Set the sending_exception attribute. */
  public void update() {
    if (request != null) {
      if (!request.streamBased()) {
        Any user_ex = request.except();
        if (user_ex != null) {
          sending_exception = user_ex;
        }
      }

      SystemException sys_ex = request.getSystemException();
      if (sys_ex != null) {
        org.jacorb.orb.SystemExceptionHelper.insert(sending_exception, sys_ex);
      }

      forward_reference = request.getForwardReference();
    }
  }
  public ServerRequestInfoImpl(org.jacorb.orb.ORB orb, ServerRequest request, Servant servant) {
    super(orb);

    this.request = request;
    operation = request.operation();
    response_expected = request.responseExpected();
    sync_scope = request.syncScope();
    requestId = request.requestId();
    objectId = request.objectId();

    if (servant != null) {
      setServant(servant);
    }

    setRequestServiceContexts(request.getServiceContext());

    sending_exception = orb.create_any();
  }
  public Any result() {
    if (caller_op != ServerInterceptorIterator.SEND_REPLY) {
      throw new BAD_INV_ORDER(
          "The attribute \"result\" is currently invalid!", 10, CompletionStatus.COMPLETED_MAYBE);
    }

    Any result = null;

    try {
      if (request != null) {
        result = request.result();
      }
    } catch (Exception e) {
    }

    if (result == null) {
      throw new NO_RESOURCES(
          "Stream-based skeletons/stubs do not support this op",
          1,
          CompletionStatus.COMPLETED_MAYBE);
    }

    return result;
  }
 /**
  * Public accessor to access the internal request stream. Using this API it may be possible to
  * corrupt the outputstream and therebye the call chain. Use at your own risk.
  */
 public RequestInputStream getRequestStream() {
   return request.get_in();
 }
 /**
  * Public accessor to access the internal reply stream. Using this API it may be possible to
  * corrupt the inputstream and therebye the call chain. Use at your own risk.
  */
 public ReplyOutputStream getReplyStream() {
   return request.get_out();
 }
 /**
  * Public accessor to return the connection being used by this ServerRequestInfoImpl.
  *
  * @return the connection (maybe null if local call and no connection has been used).
  */
 public GIOPConnection getConnection() {
   return (request == null ? null : request.getConnection());
 }