# Path: pypipeline/core/Processor.py
# class Processor:
#     def __init__(self, obj):
#         self.object = obj
#         self.next = None
# 
#     def process(self, exchange):
#         try:
#             self._process(exchange)
#         except Exception as e:
#             raise e
# 
#     def _process(self, exchange):
#         self.object.process(exchange)
#         if self.next is not None:
#             self.next.process(exchange)


from pypipeline.core.Processor import Processor


class ContentBasedRouterProcessor(Processor):
    def __init__(self, cbr):
        super().__init__(None)
        self.cbr = cbr

    def _process(self, exchange):

# Path: pypipeline/core/Processor.py
# class Processor:
#     def __init__(self, obj):
#         self.object = obj
#         self.next = None
# 
#     def process(self, exchange):
#         try:
#             self._process(exchange)
#         except Exception as e:
#             raise e
# 
#     def _process(self, exchange):
#         self.object.process(exchange)
#         if self.next is not None:
#             self.next.process(exchange)


# Path: pypipeline/eip/cbr/ContentBasedRouterProcessor.py
from pypipeline.core.Processor import Processor



class ContentBasedRouterProcessor(Processor):
    def __init__(self, cbr):
        super().__init__(None)
        self.cbr = cbr

    def _process(self, exchange):

        pipeline = self.cbr.get_valid_pipeline(exchange)