/**
   * This constructor is to cater for local calls where portable interceptors are involved. These
   * calls are now handled locally rather than via the remote request mechanism so there will be no
   * request from which to obtain information
   *
   * @param bs
   */
  public ServerRequestInfoImpl(
      org.jacorb.orb.ORB orb,
      Collection<ServiceContext> contexts,
      Servant servant,
      byte[] objectId,
      String operation,
      boolean response_expected,
      short sync_scope) {
    super(orb);

    this.operation = operation;
    this.response_expected = response_expected;
    this.sync_scope = sync_scope;
    this.objectId = objectId;

    requestId = 0;
    request = null;

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

    if (contexts != null) {
      setRequestServiceContexts(contexts.toArray(new ServiceContext[contexts.size()]));
    }

    sending_exception = orb.create_any();
  }
  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();
  }
Beispiel #3
0
  public Any decode_value(byte[] data, TypeCode tc) throws FormatMismatch, TypeMismatch {
    final CDRInputStream in = new CDRInputStream(orb, data);

    try {
      in.setGIOPMinor(giopMinor);

      in.openEncapsulatedArray();
      Any result = orb.create_any();
      result.read_value(in, tc);

      // not necessary, since stream is never used again
      // in.closeEncasupaltion();

      return result;
    } finally {
      in.close();
    }
  }