コード例 #1
0
    def handle_process2(self, process):

        self.pipeline.get_process_info(process)

        # get the handler and instantiate it
        handler_class = self.pipeline.get_handler_class(process)
        if not handler_class:
            return

        try:
            handler = AppEnvironment.create_from_class_path(handler_class)
        except ImportError:
            raise ImportError("Could not import handler class [%s]" %
                              handler_class)

        # pass relevant information to the handler
        handler.set_server(self.server)
        handler.set_package(self.package)

        # get input processes and hand over the delivery
        input_processes = self.pipeline.get_input_process_names(process)
        for input_process in input_processes:
            print "input: ", input_process
        #if self.handlers:
        #    handler.set_input( self.handlers[-1].get_output() )

        # store the handler and execute
        self.handlers.append(handler)
        handler.execute()

        # process all of the output handlers
        output_processes = self.pipeline.get_output_process_names(process)
        for output_process in output_processes:
            self.handle_process2(output_process)
コード例 #2
0
ファイル: interpreter.py プロジェクト: 0-T-0/TACTIC
    def handle_process2(my, process):

        my.pipeline.get_process_info(process)

        # get the handler and instantiate it
        handler_class = my.pipeline.get_handler_class(process)
        if not handler_class:
            return

        try:
            handler = AppEnvironment.create_from_class_path(handler_class)
        except ImportError:
            raise ImportError("Could not import handler class [%s]" % handler_class)
        
        # pass relevant information to the handler
        handler.set_server(my.server)
        handler.set_package(my.package)

        # get input processes and hand over the delivery
        input_processes = my.pipeline.get_input_process_names(process)
        for input_process in input_processes:
            print "input: ", input_process
        #if my.handlers:
        #    handler.set_input( my.handlers[-1].get_output() )


        # store the handler and execute
        my.handlers.append(handler)
        handler.execute()

        # process all of the output handlers
        output_processes = my.pipeline.get_output_process_names(process)
        for output_process in output_processes:
            my.handle_process2(output_process)
コード例 #3
0
ファイル: interpreter.py プロジェクト: 0-T-0/TACTIC
    def handle_action(my, action_node, package):
        handler_cls = action_node.getAttribute("class")
        try:
            handler = AppEnvironment.create_from_class_path(handler_cls)
        except ImportError:
            raise ImportError("Could not import handler class [%s]" % handler_cls)
            
        handler.set_server(my.server)
        handler.set_package(package)

        # hand over the delivery
        if my.handlers:
            handler.set_input( my.handlers[-1].get_output() )

        my.handlers.append(handler)
        handler.execute()
コード例 #4
0
    def handle_action(self, action_node, package):
        handler_cls = action_node.getAttribute("class")
        try:
            handler = AppEnvironment.create_from_class_path(handler_cls)
        except ImportError:
            raise ImportError("Could not import handler class [%s]" %
                              handler_cls)

        handler.set_server(self.server)
        handler.set_package(package)

        # hand over the delivery
        if self.handlers:
            handler.set_input(self.handlers[-1].get_output())

        self.handlers.append(handler)
        handler.execute()