Package org.omg.IOP

Examples of org.omg.IOP.ServiceContext


        int n = contextList.length;
        String username = null;
        String password = null;

        for (int i = 0; i < n; i++) {
            ServiceContext context = contextList[i];
            int tag = context.context_id;

            /*
            if (tag == SecurityInfo.TAG_USERNAME)
            {
View Full Code Here


        }
        ServiceContext[] context = new ServiceContext[count];
        int index = 0;
        context[index++] = CODE_SET_SERVICE_CONTEXT;
        if (username != null) {
            context[index++] = new ServiceContext(SecurityInfo.TAG_USERNAME, SecurityInfo.encode(username));
        }
        if (password != null) {
            context[index++] = new ServiceContext(SecurityInfo.TAG_PASSWORD, SecurityInfo.encode(password));
        }
        return context;
    }
View Full Code Here

    protected void processReplyServiceContext(ReplyHeader_1_2 reply) {
        ServiceContext[] list = reply.service_context;
        int n = list.length;
        for (int i = 0; i < n; i++) {
            ServiceContext sc = list[i];
            if (sc.context_id == 0xCFCFCFCF
                || sc.context_id == 0xDFDFDFDF) {
                // "CF..." indicates "Call Forget Request"
                // "DF..." indicates "Call Forget Response"
                callForget = sc.context_id;
View Full Code Here

            if (serverPolicy.getClassloader() != null) Thread.currentThread().setContextClassLoader(serverPolicy.getClassloader());

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

            ServiceContext serviceContext = ri.get_request_service_context(SecurityAttributeService.value);
            if (serviceContext == null) return;

            if (log.isDebugEnabled()) log.debug("Found service context");

            Any any = Util.getCodec().decode_value(serviceContext.context_data, SASContextBodyHelper.type());
View Full Code Here

        try {
            SASContextBody sasContextBody = SASReplyManager.clearSASReply(ri.request_id());
            if (sasContextBody != null) {
                Any any = ORB.init().create_any();
                SASContextBodyHelper.insert(any, sasContextBody);
                ri.add_reply_service_context(new ServiceContext(SecurityAttributeService.value, Util.getCodec().encode_value(any)), true);
            }
        } catch (InvalidTypeForEncoding itfe) {
            log.error("InvalidTypeForEncoding thrown", itfe);
            throw new INTERNAL("InvalidTypeForEncoding thrown: " + itfe);
        }
View Full Code Here

        threadLocal.incomingPrincipalName = empty;
        threadLocal.sasReply = null;
        threadLocal.sasReplyIsAccept = false;

        try {
            ServiceContext sc = ri.get_request_service_context(sasContextId);
            Any any = codec.decode_value(sc.context_data, SASContextBodyHelper.type());
            SASContextBody contextBody = SASContextBodyHelper.extract(any);

            if (contextBody != null) {
                if (contextBody.discriminator() == MTMessageInContext.value) {
View Full Code Here

        JacORBLogger.ROOT_LOGGER.traceSendReply(ri.operation());
        CurrentRequestInfo threadLocal = (CurrentRequestInfo) threadLocalData.get();

        if (threadLocal.sasReply != null) {
            try {
                ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(threadLocal.sasReply));
                ri.add_reply_service_context(sc, true);
            } catch (InvalidTypeForEncoding e) {
                throw JacORBMessages.MESSAGES.unexpectedException(e);
            }
        }
View Full Code Here

        //
        // The CSIv2 spec does not explicitly disallow an SAS accept in an IIOP exception reply.
        boolean interopIONA = "on".equalsIgnoreCase(CorbaORBService.getORBProperty(JacORBSubsystemConstants.INTEROP_IONA));
        if (threadLocal.sasReply != null && !interopIONA) {
            try {
                ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(threadLocal.sasReply));
                ri.add_reply_service_context(sc, true);
            } catch (InvalidTypeForEncoding e) {
                throw JacORBMessages.MESSAGES.unexpectedException(e);
            }
        }
View Full Code Here

    }

    public void receive_request_service_contexts(ServerRequestInfo ri) {
        JacORBLogger.ROOT_LOGGER.traceReceiveRequestServiceContexts(ri.operation());
        try {
            ServiceContext sc = ri.get_request_service_context(txContextId);
            Any any = codec.decode_value(sc.context_data, PropagationContextHelper.type());
            ri.set_slot(slotId, any);
        } catch (BAD_PARAM e) {
            // no service context with txContextId: do nothing
        } catch (FormatMismatch e) {
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 (java.io.UnsupportedEncodingException e) {
            throw JacORBMessages.MESSAGES.unexpectedException(e);
        } catch (InvalidTypeForEncoding 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.