Package ru.bgcrm.util
Class AdminPortListener
java.lang.Object
ru.bgcrm.util.AdminPortListener
- All Implemented Interfaces:
Runnable
Socket listener for managing running app.
Accepts one line text commands. Is singleton.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAdminPortListener
(int port) Constructor, binds a server socket on loopback interface only. -
Method Summary
-
Field Details
-
RESPONSE_SCHEDULER_HAS_TASKS
- See Also:
-
s
-
run
protected boolean run
-
-
Constructor Details
-
AdminPortListener
public AdminPortListener(int port) Constructor, binds a server socket on loopback interface only.- Parameters:
port
- port.
-
-
Method Details
-
run
public void run()Main listening loop. -
getVersionInfo
- Returns:
- app version string.
-
statusApp
- Returns:
- running application status: version, uptime, memory.
-
uptimeStatus
- Returns:
- string with formatted
START_TIME
and calculated uptime after it.
-
memoryStatus
- Returns:
- string with applications memory state.
-
start
public void start()
-