Ejemplo n.º 1
0
 def __init__(self, session):
     ServerSessionState.__init__(self, session)
     self._pathname2operation = {}
     self._directories = []
     self._queues_to_listen = [
         'usercommand', 'sessioncommand', 'systemcommand',
         'servermessage', 'operation'
     ]
Ejemplo n.º 2
0
 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()
Ejemplo n.º 3
0
 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()
Ejemplo n.º 4
0
 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)
Ejemplo n.º 6
0
    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)
Ejemplo n.º 7
0
 def __init__(self, session):
     ServerSessionState.__init__(self, session)
     self._registered_operations = []
     self._next_state = None
Ejemplo n.º 8
0
 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
 def __init__(self, session):
     ServerSessionState.__init__(self, session)
     self.last_operation_time = datetime.datetime.now()
     self._context.listening_operations = True
Ejemplo n.º 13
0
 def __init__(self, session):
     ServerSessionState.__init__(self, session)
     self.messages_to_handle_before_start = []
Ejemplo n.º 14
0
 def __init__(self, session):
     ServerSessionState.__init__(self, session)
     self.crypto = CryptoUtil()