Package org.omg.IOP

Examples of org.omg.IOP.ServiceContext


  }

  void addCallPattern(ServerRequestInfo info)
  {
    // Add one context.
    ServiceContext c = new ServiceContext();
    c.context_id = 6000;
    c.context_data = callPattern.toString().getBytes();

    info.add_reply_service_context(c, false);
  }
View Full Code Here


    callPattern.append("Ex");

    // _get_theField is handled in the forwarded target without interceptors.
    if (!info.operation().equals("_get_theField"))
      {
        ServiceContext s = info.get_reply_service_context(6000);
        String ps = new String(s.context_data);
        if (s.context_id != 6000)
          {
            throw new RuntimeException(
              "C ERROR Returned context 6000 id mismatch"
View Full Code Here

    // Check if the two server side service contexts are present.
    // _get_theField is handled in the forwarded target without interceptors.
    if (!info.operation().equals("_get_theField"))
      {
        ServiceContext s = info.get_reply_service_context(6000);
        String ps = new String(s.context_data);
        if (s.context_id != 6000)
          {
            throw new RuntimeException(
              "C ERROR Returned context 6000 id mismatch"
View Full Code Here

  private void checkServerCtx(ClientRequestInfo info)
  {
    // _get_theField is handled in the forwarded target without interceptors.
    if (!info.operation().equals("_get_theField"))
      {
        ServiceContext se = info.get_reply_service_context(6001);
        if (se.context_data.length != 0)
          {
            throw new RuntimeException(
              "C ERROR Server side context 6001 is not present in reply."
            );
          }

        ServiceContext sx = info.get_reply_service_context(6002);
        if (sx.context_data.length != 0)
          {
            throw new RuntimeException(
              "C ERROR Server side context 6001 is not present in reply."
            );
View Full Code Here

    callPattern.setLength(0);
    callPattern.append("SRq[" + info.operation() + "]");

    // One with content.
    ServiceContext c = new ServiceContext();
    c.context_id = 5000;
    c.context_data = "my_request_context_1".getBytes();

    info.add_request_service_context(c, false);

    // Another empty.
    ServiceContext ce = new ServiceContext();
    ce.context_id = 5001;
    ce.context_data = new byte[ 0 ];

    info.add_request_service_context(ce, false);
  }
View Full Code Here

                      + require_gssup_authorization);
            log.debug("support gssup identity: "
                      + support_gssup_principal_identity);
        }

        ServiceContext serviceContext;
        try {
            serviceContext = ri
                    .get_request_service_context(SecurityAttributeService.value);
        }
        catch (org.omg.CORBA.BAD_PARAM ex) {
View Full Code Here

        // ignore tx for local calls
        if (CallStatus.popIsLocal()) {
            return;
        }

        ServiceContext serviceContext;
        try {
            serviceContext = ri
                    .get_reply_service_context(SecurityAttributeService.value);
        }
        catch (org.omg.CORBA.BAD_PARAM ex) {
View Full Code Here

            MARSHAL me = new MARSHAL("cannot encode local security descriptor",
                                     0, CompletionStatus.COMPLETED_NO);
            me.initCause(ex);
            throw me;
        }
        return new ServiceContext(SecurityAttributeService.value, data);
    }
View Full Code Here

            if (compat.size() == 0) return;

            if (log.isDebugEnabled()) log.debug("Found compatible policy");

            ServiceContext context = ((CSSCompoundSecMechConfig) compat.get(0)).generateServiceContext();

            if (context == null) return;

            if (log.isDebugEnabled()) {
                log.debug("Msg context id: " + context.context_id);
View Full Code Here

                contextBody.establish_msg(message);

                // stuff the SAS context into the outgoing request.
                Any any = ORB.init().create_any();
                SASContextBodyHelper.insert(any, contextBody);
                ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any));
                ri.add_request_service_context(sc, true /*replace existing context*/);
            }
        } catch (InvalidTypeForEncoding e) {
            throw JacORBLogger.ROOT_LOGGER.unexpectedException(e);
        }
View Full Code Here

TOP

Related Classes of org.omg.IOP.ServiceContext

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.