public abstract class InfoSystem extends java.lang.Object implements SubSystem
Subclasses should decide how InfoRequests are run locally if necessary.
Everything should be called from an Async thread.
Modifier and Type | Field and Description |
---|---|
protected ConnectionSystem |
connectionSystem |
protected InfoRequestFactory |
infoRequestFactory |
protected com.djrapitops.plugin.logging.console.PluginLogger |
logger |
protected ServerInfo |
serverInfo |
protected dagger.Lazy<WebServer> |
webServer |
Modifier | Constructor and Description |
---|---|
protected |
InfoSystem(InfoRequestFactory infoRequestFactory,
ConnectionSystem connectionSystem,
ServerInfo serverInfo,
dagger.Lazy<WebServer> webServer,
com.djrapitops.plugin.logging.console.PluginLogger logger) |
Modifier and Type | Method and Description |
---|---|
void |
disable()
Performs disable actions for the subsystem
|
void |
enable()
Performs enable actions for the subsystem.
|
void |
generateAnalysisPage(java.util.UUID serverUUID)
Refreshes Analysis page.
|
void |
generateAndCachePlayerPage(java.util.UUID player)
Refreshes Player page.
|
ConnectionSystem |
getConnectionSystem() |
void |
requestSetUp(java.lang.String addressToRequestServer)
Requests Set up from Bungee.
|
abstract void |
runLocally(InfoRequest infoRequest)
Run the InfoRequest locally.
|
void |
sendRequest(InfoRequest infoRequest)
Send an InfoRequest to another server or run locally if necessary.
|
protected final InfoRequestFactory infoRequestFactory
protected final ConnectionSystem connectionSystem
protected final ServerInfo serverInfo
protected final dagger.Lazy<WebServer> webServer
protected final com.djrapitops.plugin.logging.console.PluginLogger logger
protected InfoSystem(InfoRequestFactory infoRequestFactory, ConnectionSystem connectionSystem, ServerInfo serverInfo, dagger.Lazy<WebServer> webServer, com.djrapitops.plugin.logging.console.PluginLogger logger)
public void generateAndCachePlayerPage(java.util.UUID player) throws WebException
No calls from non-async thread found on 09.02.2018
player
- UUID of the player.WebException
- If fails.public void generateAnalysisPage(java.util.UUID serverUUID) throws WebException
No calls from non-async thread found on 09.02.2018
serverUUID
- UUID of the server to analyzeWebException
- If fails.public void sendRequest(InfoRequest infoRequest) throws WebException
No calls from non-async thread found on 09.02.2018
infoRequest
- InfoRequest to send or run.WebException
- If fails.public abstract void runLocally(InfoRequest infoRequest) throws WebException
No calls from non-async thread found on 09.02.2018
infoRequest
- InfoRequest to run.WebException
- If fails.public void enable()
SubSystem
public void disable()
SubSystem
public ConnectionSystem getConnectionSystem()
public void requestSetUp(java.lang.String addressToRequestServer) throws WebException
No calls from non-async thread found on 09.02.2018
addressToRequestServer
- Address of Bungee server.WebException
- If fails.