More readable description for RobusServer-class.

This commit is contained in:
Denis Knauf 2021-11-30 14:09:35 +01:00
parent 0e90737ae1
commit 92060db994

View file

@ -95,14 +95,15 @@ end
# Easy problem-handler for your Server.
#
# A Server should never crash.
# If an Exception raised, which is not rescued, your program will shutdown abnormaly.
# Or if a signal tries to "kill" your program, your program will shutdown abnormaly too.
# Problem: Your process should not crash, it should be available for anytime.
# 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.
#
# 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 initializing, you can override **#initialize**, but doen't forget to call **super**.
# For implementation a server, create a subclass of RobustServer and implement the *#run*-method.
# 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 UnimplementedRun <Exception
end