Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/y/pyon-HEAD/pyon/core/governance/conversation/conversation_monitor_interceptor.py   pyon(Download)
            #log.trace("ConversationMonitorInterceptor.outgoing: %s" % invocation)
 
        invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] = GovernanceDispatcher.STATUS_STARTED
 
        conv_msg_type = invocation.headers.get('conv-msg-type', None)
        #    op_type = LocalType.SEND;
            self._check(invocation, op_type, self_principal, target_principal)
            if invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_STARTED:
                invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] = GovernanceDispatcher.STATUS_COMPLETE
        else:
            #log.trace("ConversationMonitorInterceptor.incoming: %s" % invocation)
 
        invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] = GovernanceDispatcher.STATUS_STARTED
 
        conv_msg_type = invocation.headers.get('conv-msg-type', None)
            self._check(invocation, op_type, self_principal, target_principal)
 
            if invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_STARTED:
                invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] = GovernanceDispatcher.STATUS_COMPLETE
        else:

src/p/y/pyon-HEAD/pyon/core/governance/governance_controller.py   pyon(Download)
 
            #Stop processing message if an issue with the message was found by an interceptor.
            if ( invocation.message_annotations.has_key(GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION) and invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_REJECT) or\
               ( invocation.message_annotations.has_key(GovernanceDispatcher.POLICY__STATUS_ANNOTATION) and invocation.message_annotations[GovernanceDispatcher.POLICY__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_REJECT) :
                break

src/p/y/pyon-HEAD/pyon/ion/test/test_conversation.py   pyon(Download)
        def handle_outgoing_message(*args, **kwargs):
            inv  = args[1]
            if inv.message_annotations.has_key(GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION) and\
               inv.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_REJECT:
                    raise WrongMessageAssertion("Monitor detected an error")