Exemple #1
0
 def __init__(self,
              logger,
              simple_io_config={},
              data_format=None,
              transport=None):
     self.logger = logger
     self.payload = ''
     self.raw_request = ''
     self.input = ServiceInput()
     self.cid = None
     self.simple_io_config = simple_io_config
     self.has_simple_io_config = False
     self.bool_parameter_prefixes = simple_io_config.get(
         'bool_parameter_prefixes', [])
     self.int_parameters = simple_io_config.get('int_parameters', [])
     self.int_parameter_suffixes = simple_io_config.get(
         'int_parameter_suffixes', [])
     self.is_xml = None
     self.data_format = data_format
     self.transport = transport
     self.http = HTTPRequestData()
     self._wsgi_environ = None
     self.channel_params = {}
     self.merge_channel_params = True
     self.params_priority = PARAMS_PRIORITY.DEFAULT
Exemple #2
0
    def init(self, is_sio, cid, sio, data_format, transport, wsgi_environ, encrypt_func):
        """ Initializes the object with an invocation-specific data.
        """
        self.input = ServiceInput()
        self.encrypt_func = encrypt_func

        if is_sio:
            self.init_flat_sio(cid, sio, data_format, transport, wsgi_environ, getattr(sio, 'input_required', []))

        # We merge channel params in if requested even if it's not SIO
        else:
            if self.merge_channel_params:
                self.input.update(self.channel_params)
Exemple #3
0
    def init(self,
             is_sio,
             cid,
             sio,
             data_format,
             transport,
             wsgi_environ,
             _dt_fixed_width=SIMPLE_IO.FORMAT.FIXED_WIDTH):
        """ Initializes the object with an invocation-specific data.
        """
        self.input = FixedWidth(
        ) if data_format == _dt_fixed_width else ServiceInput()

        if is_sio:
            (self.init_list_sio if data_format == _dt_fixed_width else
             self.init_flat_sio)(cid, sio, data_format, transport,
                                 wsgi_environ,
                                 getattr(sio, 'input_required', []))

        # We merge channel params in if requested even if it's not SIO
        else:
            if self.merge_channel_params:
                self.input.update(self.channel_params)