Package org.apache.geronimo.corba.ior

Examples of org.apache.geronimo.corba.ior.InternalServiceContextList


   * this will write
   */
  public GIOPOutputStream startRequest(GIOPVersion version,
      InternalTargetAddress targetAddress, ClientInvocation inv,
      byte[] principal) throws IOException {
    InternalServiceContextList contextList = inv
        .getRequestServiceContextList();
    byte response_flags = inv.getResponseFlags();
    String operation = inv.getOperation();

    RequestID requestID = getNextRequestID();

    inv.setRequestID(requestID);

    // acquire output channel token
    OutputChannel outputChannel = transport.getOutputChannel();
    GIOPOutputStream out = new GIOPOutputStream(orb, outputChannel, version);

    // this will write a GIOP message header
    out.beginGIOPStream(MsgType_1_1._Request, requestID);

    // add stuff like character encoding, and
    // sending context rumtine service contexts...
    add_outgoing_system_contexts(contextList);

    // now write the request

    switch (version.minor) {
    case 0:
    case 1:
    // Write RequestHeader_1_1
    {
      contextList.write(out);
      out.write_long(requestID.value());
      switch (response_flags) {
      case SYNC_NONE:
      case SYNC_WITH_TRANSPORT:
        out.write_boolean(false);
        break;
      case SYNC_WITH_SERVER:
      case SYNC_WITH_TARGET:
        out.write_boolean(true);
        break;
      }
      out.skip(3);
      targetAddress.writeObjectKey(out);
      if (principal == null) {
        out.write_long(0);
      } else {
        out.write_long(principal.length);
        out.write_octet_array(principal, 0, principal.length);
      }
    }

    case 2:
    // Write RequestHeader_1_2
    {
      out.write_long(requestID.value());
      out.write_octet(response_flags);
      out.skip(3); // can be dropped, target address aligns anyway
      targetAddress.write(out);
      out.write_string(operation);
      contextList.write(out);
     
      out.setInsertHeaderPadding(true);
     
      break;
    }
View Full Code Here


      ReplyStatusType_1_2 reply_status = ReplyStatusType_1_2Helper
          .read(in);
      inv.setReplyStatus(reply_status);

      InternalServiceContextList scl = new InternalServiceContextList();
      scl.read(in);

      inv.setResposeServiceContextList(scl);

      break;
    default:
View Full Code Here

    {
        this.manager = manager;
        this.operation = operation;
        this.responseExpected = responseExpected;
        this.profile = profile;
        this.iscl = new InternalServiceContextList();
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.corba.ior.InternalServiceContextList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.