def __init__(self, session): ServerSessionState.__init__(self, session) self._pathname2operation = {} self._directories = [] self._queues_to_listen = [ 'usercommand', 'sessioncommand', 'systemcommand', 'servermessage', 'operation' ]
def __init__(self, session): ServerSessionState.__init__(self, session) self._listening_operations = True self._pathname2operation = {} self._num_received_operations = 0 self._num_finished_operations = 0 self._received_all_operations = False self._lock = threading.Lock()
def __init__(self, session): ServerSessionState.__init__(self, session) self._pathname_to_do = {} self._pathname2proof = {} self._queues_to_listen = [ 'usercommand', 'sessioncommand', 'systemcommand', 'servermessage' ]
def _handle_message_ERROR(self, message): """Received an error from the server. Was it because of an invalid username? """ error_code = message.getParameter("error_code") reason = message.getParameter("reason") if error_code != UNEXPECTED_DATA or not reason.startswith("Invalid username provided"): ServerSessionState._handle_message_ERROR(self, message) return self.logger.error("Server refused the username: %s" % self._context.username) relink_user(self)
def _handle_message_ERROR(self, message): """Received an error from the server. Was it because of an invalid username? """ error_code = message.getParameter('error_code') reason = message.getParameter('reason') if error_code != UNEXPECTED_DATA \ or not reason.startswith("Invalid username provided"): ServerSessionState._handle_message_ERROR(self, message) return self.logger.error('Server refused the username: %s' % self._context.username) relink_user(self)
def __init__(self, session): ServerSessionState.__init__(self, session) self._registered_operations = [] self._next_state = None
def __init__(self, session): ServerSessionState.__init__(self, session) self._listening_operations = True
def __init__(self, session): ServerSessionState.__init__(self, session) self.messages_to_handle_before_start = []
def __init__(self, session): ServerSessionState.__init__(self, session) self.crypto = CryptoUtil()
def __init__(self, session): ServerSessionState.__init__(self, session) self.last_operation_time = datetime.datetime.now() self._context.listening_operations = True