Package org.omg.CSI

Examples of org.omg.CSI.SASContextBody


    @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().
            if (traceEnabled) {
                log.trace("receive_reply: got SAS reply, type " + contextBody.discriminator());
            }

            if (contextBody.discriminator() == MTContextError.value) {
                // should not happen.
                log.warn("Unexpected ContextError in SAS reply");
                throw new NO_PERMISSION("Unexpected ContextError in SAS reply", MinorCodes.SAS_CSS_FAILURE,
                        CompletionStatus.COMPLETED_YES);
            }
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 context body just to check that it contains
            // a well-formed message.
            if (traceEnabled) {
                log.trace("receive_exception: got SAS reply, type " + contextBody.discriminator());
            }
        } catch (BAD_PARAM e) {
            // no service context with sasContextId: do nothing.
        } catch (FormatMismatch e) {
            throw new MARSHAL("Could not parse SAS reply: " + e, MinorCodes.SAS_CSS_FAILURE,
View Full Code Here

                new ContextError(0, /* context id                     */
                        1,          /* major status: invalid evidence */
                        1,          /* minor status (always 1)        */
                        encapsulatedErrorToken);

        msgBodyCtxError = new SASContextBody();
        msgBodyCtxError.error_msg(ctxError);

        // initialize msgCtx0Rejected (major status: invalid evidence).
        msgCtx0Rejected = createMsgCtxError(0, 1);

View Full Code Here

        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) {
                    // should not happen, as stateful context requests are always negotiated down to stateless in this implementation.
                    long contextId = contextBody.in_context_msg().client_context_id;
                    threadLocal.sasReply = createMsgCtxError(contextId, 4 /* major status: no context */);
                    throw new NO_PERMISSION("SAS context does not exist.");
                } else if (contextBody.discriminator() == MTEstablishContext.value) {
                    EstablishContext message = contextBody.establish_msg();
                    threadLocal.contextId = message.client_context_id;
                    threadLocal.sasContextReceived = true;

                    if (message.client_authentication_token != null && message.client_authentication_token.length > 0) {
                        if (traceEnabled) {
View Full Code Here

TOP

Related Classes of org.omg.CSI.SASContextBody

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.