@Override public void receive_reply(ClientRequestInfo ri) { try { ServiceContext sc = ri.get_reply_service_context(SAS_CONTEXT_ID); 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(). IIOPLogger.ROOT_LOGGER.tracef("receive_reply: got SAS reply, type %d", contextBody.discriminator()); if (contextBody.discriminator() == MTContextError.value) { // should not happen. throw IIOPLogger.ROOT_LOGGER.unexpectedContextErrorInSASReply(0, CompletionStatus.COMPLETED_YES); } } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing } catch (FormatMismatch | TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } }
@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(). IIOPLogger.ROOT_LOGGER.tracef("receive_reply: got SAS reply, type %d", contextBody.discriminator()); if (contextBody.discriminator() == MTContextError.value) { // should not happen. throw IIOPLogger.ROOT_LOGGER.unexpectedContextErrorInSASReply(0, CompletionStatus.COMPLETED_YES); } } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } }
@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(). IIOPLogger.ROOT_LOGGER.tracef("receive_reply: got SAS reply, type %d", contextBody.discriminator()); if (contextBody.discriminator() == MTContextError.value) { // should not happen. throw IIOPLogger.ROOT_LOGGER.unexpectedContextErrorInSASReply(0, CompletionStatus.COMPLETED_YES); } } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0,CompletionStatus.COMPLETED_YES); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0,CompletionStatus.COMPLETED_YES); } }
@Override public void receive_exception(ClientRequestInfo ri) throws ForwardRequest { try { ServiceContext sc = ri.get_reply_service_context(SAS_CONTEXT_ID); Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type()); SASContextBody contextBody = SASContextBodyHelper.extract(msg); // At this point contextBody may contain 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. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch | TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@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 either a CompleteEstablishContext message or a ContextError message. // Neither message requires any treatment. We decoded the contextbody just to check that it contains a // well-formed message. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@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 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. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
if (contextBody.discriminator() == MTMessageInContext.value) { } else if (contextBody.discriminator() == MTEstablishContext.value) { EstablishContext message = contextBody.establish_msg(); threadLocal.contextId = message.client_context_id;
void returnCompleteEstablishContext(ServerRequestInfo ri) { // Create CompleteEstablishContext SASContextBody sasBody = new SASContextBody(); CompleteEstablishContext completeMsg = new CompleteEstablishContext(); completeMsg.client_context_id = 0; completeMsg.context_stateful = false; completeMsg.final_context_token = EMPTY_BARR; sasBody.complete_msg(completeMsg); log.fine("Adding SASContextBody, discriminator = " + sasBody.discriminator()); ri.add_reply_service_context(encodeSASContextBody(sasBody), true); }
void returnContextError(ServerRequestInfo ri, int major, int minor) { // Create CompleteEstablishContext SASContextBody sasBody = new SASContextBody(); ContextError errorMsg = new ContextError(); errorMsg.client_context_id = 0; errorMsg.major_status = major; errorMsg.minor_status = minor; errorMsg.error_token = EMPTY_BARR; sasBody.error_msg(errorMsg); log.fine("Adding SASContextBody, discriminator = " + sasBody.discriminator()); ri.add_reply_service_context(encodeSASContextBody(sasBody), true); }
@Override public void receive_reply(ClientRequestInfo ri) { try { ServiceContext sc = ri.get_reply_service_context(SAS_CONTEXT_ID); 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(). IIOPLogger.ROOT_LOGGER.tracef("receive_reply: got SAS reply, type %d", contextBody.discriminator()); if (contextBody.discriminator() == MTContextError.value) { // should not happen. throw IIOPLogger.ROOT_LOGGER.unexpectedContextErrorInSASReply(0, CompletionStatus.COMPLETED_YES); } } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing } catch (FormatMismatch | TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } }
@Override public void receive_reply(ClientRequestInfo ri) { try { ServiceContext sc = ri.get_reply_service_context(SAS_CONTEXT_ID); 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(). IIOPLogger.ROOT_LOGGER.tracef("receive_reply: got SAS reply, type %d", contextBody.discriminator()); if (contextBody.discriminator() == MTContextError.value) { // should not happen. throw IIOPLogger.ROOT_LOGGER.unexpectedContextErrorInSASReply(0, CompletionStatus.COMPLETED_YES); } } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing } catch (FormatMismatch | TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } }
@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(). IIOPLogger.ROOT_LOGGER.tracef("receive_reply: got SAS reply, type %d", contextBody.discriminator()); if (contextBody.discriminator() == MTContextError.value) { // should not happen. throw IIOPLogger.ROOT_LOGGER.unexpectedContextErrorInSASReply(0, CompletionStatus.COMPLETED_YES); } } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_YES); } }
public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CSI.SASContextBody value) { ostream.write_short (value.discriminator ()); switch (value.discriminator ()) { case org.omg.CSI.MTEstablishContext.value: org.omg.CSI.EstablishContextHelper.write (ostream, value.establish_msg ()); break; case org.omg.CSI.MTCompleteEstablishContext.value: org.omg.CSI.CompleteEstablishContextHelper.write (ostream, value.complete_msg ()); break; case org.omg.CSI.MTContextError.value: org.omg.CSI.ContextErrorHelper.write (ostream, value.error_msg ()); break; case org.omg.CSI.MTMessageInContext.value: org.omg.CSI.MessageInContextHelper.write (ostream, value.in_context_msg ()); break; } }
public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CSI.SASContextBody value) { ostream.write_short (value.discriminator ()); switch (value.discriminator ()) { case org.omg.CSI.MTEstablishContext.value: org.omg.CSI.EstablishContextHelper.write (ostream, value.establish_msg ()); break; case org.omg.CSI.MTCompleteEstablishContext.value: org.omg.CSI.CompleteEstablishContextHelper.write (ostream, value.complete_msg ()); break; case org.omg.CSI.MTContextError.value: org.omg.CSI.ContextErrorHelper.write (ostream, value.error_msg ()); break; case org.omg.CSI.MTMessageInContext.value: org.omg.CSI.MessageInContextHelper.write (ostream, value.in_context_msg ()); break; } }
@Override public void receive_exception(ClientRequestInfo ri) throws ForwardRequest { try { ServiceContext sc = ri.get_reply_service_context(SAS_CONTEXT_ID); Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type()); SASContextBody contextBody = SASContextBodyHelper.extract(msg); // At this point contextBody may contain 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. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch | TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@Override public void receive_exception(ClientRequestInfo ri) throws ForwardRequest { try { ServiceContext sc = ri.get_reply_service_context(SAS_CONTEXT_ID); Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type()); SASContextBody contextBody = SASContextBodyHelper.extract(msg); // At this point contextBody may contain 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. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch | TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@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 either a CompleteEstablishContext message or a ContextError message. // Neither message requires any treatment. We decoded the contextbody just to check that it contains a // well-formed message. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@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 either a CompleteEstablishContext message or a ContextError message. // Neither message requires any treatment. We decoded the contextbody just to check that it contains a // well-formed message. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@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 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. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }
@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 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. IIOPLogger.ROOT_LOGGER.tracef("receive_exception: got SAS reply, type %d", contextBody.discriminator()); } catch (BAD_PARAM e) { // no service context with sasContextId: do nothing. } catch (FormatMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } catch (TypeMismatch e) { throw IIOPLogger.ROOT_LOGGER.errorParsingSASReply(e, 0, CompletionStatus.COMPLETED_MAYBE); } }