from os import environ
from serverApp.constants.environment import * 
from serverApp.config_processor.queue import QueueConfig

class EnvironmentQueueConfig(QueueConfig):
    """ Access to Message Queue configuration from Environment """

    def message_queue_server_url(self):
        """ Url for connecting to message queue """
        return environ[MESSAGE_QUEUE_SERVER].strip()

    def message_queue_socket_out(self):
        """ Url for connecting to message queue """
        return environ[RABBIT_MQ_SOCKET_BRIDGE_OUT].strip()

    def message_queue_socket_in(self):
        """ Url for connecting to message queue """
        return environ[RABBIT_MQ_SOCKET_BRIDGE_IN].strip()

    def message_queue_user(self):
        """ User for message queue """
        return environ[MESSAGE_QUEUE_USER].strip()

    def message_queue_pass(self):
        """ Password for message queue """
        return environ[MESSAGE_QUEUE_PASSWORD].strip()
