fail2ban.server.jailthread module¶
- class fail2ban.server.jailthread.JailThread(name=None)¶
Bases:
Thread
Abstract class for threading elements in Fail2Ban.
- Attributes:
daemon
A boolean value indicating whether this thread is a daemon thread.
ident
Thread identifier of this thread or None if it has not been started.
name
A string used for identification purposes only.
status
Abstract - Should provide status information.
- activebool
Control the state of the thread.
- idlebool
Control the idle state of the thread.
- sleeptimeint
The time the thread sleeps for in the loop.
Methods
getName
()Return a string used for identification purposes only.
isAlive
()Return whether the thread is alive.
isDaemon
()Return whether this thread is a daemon.
is_alive
()Return whether the thread is alive.
join
()Safer join, that could be called also for not started (or ended) threads (used for cleanup).
onStop
()Abstract - Called when thread ends (after run).
run
()Abstract - Called when thread starts, thread stops when returns.
setDaemon
(daemonic)Set whether this thread is a daemon.
setName
(name)Set the name string for this thread.
start
()Sets active flag and starts thread.
status
([flavor])Abstract - Should provide status information.
stop
()Sets active property to False, to flag run method to return.
- isAlive()¶
Return whether the thread is alive.
This method returns True just before the run() method starts until just after the run() method terminates. See also the module function enumerate().
- join()¶
Safer join, that could be called also for not started (or ended) threads (used for cleanup).
- abstract onStop()¶
Abstract - Called when thread ends (after run).
- abstract run()¶
Abstract - Called when thread starts, thread stops when returns.
- start()¶
Sets active flag and starts thread.
- abstract status(flavor='basic')¶
Abstract - Should provide status information.
- stop()¶
Sets active property to False, to flag run method to return.