Package org.omg.CSI

Examples of org.omg.CSI.SASContextBody


                                       noAuthorizationToken,
                                       absentIdentityToken,
                                       encodedAuthenticationToken);

               // create SAS context with the EstablishContext message
               SASContextBody contextBody = new SASContextBody();
               contextBody.establish_msg(message);

               // stuff the SAS context into the outgoing request
               Any any = ORB.init().create_any();
               SASContextBodyHelper.insert(any, contextBody);
               ServiceContext sc =
View Full Code Here


      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,
View Full Code Here

      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
      }
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

      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)
         {
            // we're done
            return;
         }
         else 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)
View Full Code Here

/*     */
/* 176 */           byte[] encodedAuthenticationToken = CSIv2Util.encodeInitialContextToken(authenticationToken, this.codec);
/*     */
/* 181 */           EstablishContext message = new EstablishContext(0L, noAuthorizationToken, absentIdentityToken, encodedAuthenticationToken);
/*     */
/* 188 */           SASContextBody contextBody = new SASContextBody();
/* 189 */           contextBody.establish_msg(message);
/*     */
/* 192 */           Any any = ORB.init().create_any();
/* 193 */           SASContextBodyHelper.insert(any, contextBody);
/* 194 */           ServiceContext sc = new ServiceContext(15, this.codec.encode_value(any));
/*     */
View Full Code Here

/*     */     try
/*     */     {
/* 220 */       ServiceContext sc = ri.get_reply_service_context(15);
/* 221 */       Any msg = this.codec.decode_value(sc.context_data, SASContextBodyHelper.type());
/*     */
/* 223 */       SASContextBody contextBody = SASContextBodyHelper.extract(msg);
/*     */
/* 230 */       if (traceEnabled) {
/* 231 */         log.trace("receive_reply: got SAS reply, type " + contextBody.discriminator());
/*     */       }
/*     */
/* 234 */       if (contextBody.discriminator() == 4)
/*     */       {
/* 237 */         log.warn("Unexpected ContextError in SAS reply");
/* 238 */         throw new NO_PERMISSION("Unexpected ContextError in SAS reply", 1245904897, CompletionStatus.COMPLETED_YES);
/*     */       }
/*     */
View Full Code Here

/*     */     try
/*     */     {
/* 265 */       ServiceContext sc = ri.get_reply_service_context(15);
/* 266 */       Any msg = this.codec.decode_value(sc.context_data, SASContextBodyHelper.type());
/*     */
/* 268 */       SASContextBody contextBody = SASContextBodyHelper.extract(msg);
/*     */
/* 275 */       if (traceEnabled) {
/* 276 */         log.trace("receive_exception: got SAS reply, type " + contextBody.discriminator());
/*     */       }
/*     */
/*     */     }
/*     */     catch (BAD_PARAM e)
/*     */     {
View Full Code Here

/* 209 */       throw new RuntimeException("Unexpected exception: " + e);
/*     */     }
/*     */
/* 213 */     ContextError ctxError = new ContextError(0L, 1, 1, encapsulatedErrorToken);
/*     */
/* 219 */     this.msgBodyCtxError = new SASContextBody();
/* 220 */     this.msgBodyCtxError.error_msg(ctxError);
/*     */
/* 223 */     this.msgCtx0Rejected = createMsgCtxError(0L, 1);
/*     */   }
View Full Code Here

/*     */     try
/*     */     {
/* 361 */       ServiceContext sc = ri.get_request_service_context(15);
/* 362 */       Any any = this.codec.decode_value(sc.context_data, SASContextBodyHelper.type());
/*     */
/* 364 */       SASContextBody contextBody = SASContextBodyHelper.extract(any);
/*     */
/* 366 */       if (contextBody == null)
/*     */       {
/* 369 */         return;
/*     */       }
/* 371 */       if (contextBody.discriminator() == 5)
/*     */       {
/* 375 */         long contextId = contextBody.in_context_msg().client_context_id;
/*     */
/* 377 */         threadLocal.sasReply = createMsgCtxError(contextId, 4);
/*     */
/* 380 */         throw new NO_PERMISSION("SAS context does not exist.");
/*     */       }
/* 382 */       if (contextBody.discriminator() == 0)
/*     */       {
/* 384 */         EstablishContext message = contextBody.establish_msg();
/* 385 */         threadLocal.contextId = message.client_context_id;
/* 386 */         threadLocal.sasContextReceived = true;
/*     */
/* 388 */         if ((message.client_authentication_token != null) && (message.client_authentication_token.length > 0))
/*     */         {
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.