More readable description for RobusServer-class.

master
Denis Knauf 2021-11-30 14:09:35 +01:00
parent 0e90737ae1
commit 92060db994
1 changed files with 7 additions and 6 deletions

View File

@ -95,14 +95,15 @@ end
# Easy problem-handler for your Server. # Easy problem-handler for your Server.
# #
# A Server should never crash. # Problem: Your process should not crash, it should be available for anytime.
# If an Exception raised, which is not rescued, your program will shutdown abnormaly. # If an exception will be raised, you have to handle it, or it will be shutdown abnormaly.
# Or if a signal tries to "kill" your program, your program will shutdown abnormaly too. # Or if a signal tries to "kill" your program, your program will shutdown abnormaly, too.
# #
# With RobustServer these errors will be a more unimportant problem and It'll be easier to handle. # RobustServer handles any exception / kill, logs it and prevents the server to shutting down.
# #
# Subclasses should implements *#run*, which will be your main-worker. # For implementation a server, create a subclass of RobustServer and implement the *#run*-method.
# For initializing, you can override **#initialize**, but doen't forget to call **super**. # Anytime this *#run*-method returns or an exception will be raised, it will be rescued and run recalled.
# For initialization, you can override **#initialize**, but don't forget to call **super**.
class RobustServer class RobustServer
class UnimplementedRun <Exception class UnimplementedRun <Exception
end end