Package org.omg.IOP

Examples of org.omg.IOP.ServiceContext


        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 (INTERNAL)new INTERNAL("InvalidTypeForEncoding thrown: " + itfe).initCause(itfe);
        }
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

        msg.client_context_id = 0;
        msg.client_authentication_token = as_mech.encode();
        msg.authorization_token = sas_mech.encodeAuthorizationElement();
        msg.identity_token = sas_mech.encodeIdentityToken();

        ServiceContext context = new ServiceContext();

        SASContextBody sas = new SASContextBody();
        sas.establish_msg(msg);
        Any sas_any = Util.getORB().create_any();
        SASContextBodyHelper.insert(sas_any, sas);
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

        }
        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 new MARSHAL("Unexpected exception: " + e);
            }
        }
View Full Code Here

        //
        // The CSIv2 spec does not explicitly disallow an SAS accept in an IIOP exception reply.
        if (threadLocal.sasReply != null && Boolean.parseBoolean(CorbaORBService.getORBProperty(
                JacORBConstants.SEND_SAS_ACCEPT_WITH_EXCEPTION))) {
            try {
                ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(threadLocal.sasReply));
                ri.add_reply_service_context(sc, true);
            } catch (InvalidTypeForEncoding e) {
                throw new MARSHAL("Unexpected exception: " + 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 new MARSHAL("Unexpected exception: " + e);
        } catch (InvalidTypeForEncoding e) {
View Full Code Here

    }

    @Override
    public void receive_reply(ClientRequestInfo ri) {
        try {
            ServiceContext sc = ri.get_reply_service_context(sasContextId);
            Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type());
            SASContextBody contextBody = SASContextBodyHelper.extract(msg);

            // At this point contextBody should contain a CompleteEstablishContext message, which does not require any
            // treatment. ContextError messages should arrive via receive_exception().
View Full Code Here

    }

    @Override
    public void receive_exception(ClientRequestInfo ri) {
        try {
            ServiceContext sc = ri.get_reply_service_context(sasContextId);
            Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type());
            SASContextBody contextBody = SASContextBodyHelper.extract(msg);

            // At this point contextBody may contain a either a CompleteEstablishContext message or a ContextError message.
            // Neither message requires any treatment. We decoded the contextbody just to check that it contains a
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 new MARSHAL("Unexpected exception: " + 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.