# 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/util/ExchangeUtil.py
# def copy_exchange(ex):


from pypipeline.core.Processor import Processor
from pypipeline.util import ExchangeUtil

class MulticastProcessor(Processor):

    def __init__(self, multicast):
        super().__init__(None)
        self.multicast = multicast

    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/util/ExchangeUtil.py
# def copy_exchange(ex):


# Path: pypipeline/eip/multicast/MulticastProcessor.py
from pypipeline.core.Processor import Processor
from pypipeline.util import ExchangeUtil


class MulticastProcessor(Processor):

    def __init__(self, multicast):
        super().__init__(None)
        self.multicast = multicast

    def _process(self, exchange):

        previous = None