Class BeetRootServer
java.lang.Object
ch.autumo.beetroot.server.BaseServer
ch.autumo.beetroot.server.BeetRootServer
beetRoot stand-alone server.
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseServer
BaseServer.HelpModifier and TypeClassDescriptionprotected static final classHelp class for shell script. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.LoggerLogger for this class.Fields inherited from class BaseServer
ansiErrServerName, ansiServerName, name, serverSocketFactory, startFileServer, startWebServerModifier and TypeFieldDescriptionprotected static StringColored text strings: server name for errors.protected static StringColored text strings: server name.protected StringServer name.protected ServerSocketFactoryDefault or SSL.protected booleanStart the file server?protected booleanStart web server? -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidOverwrite to do something after starting the server.protected voidOverwrite to do something after stopping the server.protected booleanOverwrite to do something before starting the server.protected voidOverwrite to do something before stopping the server.static voidCreate server and start it.Methods inherited from class BaseServer
customOperation, delete, findFile, getHelpText, getRootPath, getServerName, getShutDownHook, getValidCustomOperations, initializeLogging, printHealthStatus, processServerCommand, sendServerCommand, startServer, stopServer, storeModifier and TypeMethodDescriptionprotected voidcustomOperation(String operation, String[] params) Custom operation has been defined when starting the server, we possibly want to do something else.protected booleanInternal delete method if no file-storage has been configured.protected DownloadInternal find-file method if no file-storage has been configured.Get argument help text.protected static StringGet root path of this server.Get server name.protected ThreadOS shutdown hook.protected String[]Return a list of valid custom operationsprotected voidinitializeLogging(String logCfgFile) Initialize logging.protected booleanprintHealthStatus(boolean hasNoIssues) Prints out the health status of this server.processServerCommand(ServerCommand command) This method is called when a server command has been received.protected voidsendServerCommand(ServerCommand command) You can send local server commands to be send to the running server for possible custom operations.protected voidStart server and web server if configured.protected voidStop server and web server if configured.protected StringInternal file-store method if no file-storage has been configured.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGLogger for this class.
-
-
Constructor Details
-
BeetRootServer
Create an beetRoot server.- Parameters:
params- start or stop
-
-
Method Details
-
beforeStart
protected boolean beforeStart()Description copied from class:BaseServerOverwrite to do something before starting the server. Handle exceptions by your own!- Specified by:
beforeStartin classBaseServer- Returns:
- true id server should be started, otherwise false; e.g. a pre-condition is not met
-
afterStart
protected void afterStart()Description copied from class:BaseServerOverwrite to do something after starting the server. Handle exceptions by your own!- Specified by:
afterStartin classBaseServer
-
beforeStop
protected void beforeStop()Description copied from class:BaseServerOverwrite to do something before stopping the server. Handle exceptions by your own!- Specified by:
beforeStopin classBaseServer
-
afterStop
protected void afterStop()Description copied from class:BaseServerOverwrite to do something after stopping the server. Handle exceptions by your own!- Specified by:
afterStopin classBaseServer
-
main
-