MessageInterface.py 788 Bytes
Newer Older
jtchilders's avatar
jtchilders committed
1 2 3 4
import logging
logger = logging.getLogger(__name__)

class MessageInterface:
5 6
    '''These are the public methods to be implemented by MessageInterfaces like
    PikaMessageInterface.  All protocol-specfic methods should be hidden'''
jtchilders's avatar
jtchilders committed
7
   
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
    def __init__(self, settings):
        raise NotImplementedError

    def setup_send(self):
        raise NotImplementedError
    
    def setup_receive(self, consume_msg=None):
        raise NotImplementedError
    
    def send_msg(self, message_body):
        raise NotImplementedError

    def receive_msg(self):
        raise NotImplementedError

    def start_receive_loop(self):
        raise NotImplementedError
    
    def stop_receive_loop(self):
        raise NotImplementedError

    def close(self):
        raise NotImplementedError