public abstract class ConnectionSystem extends java.lang.Object implements SubSystem
It decides what server to use for each request.
Modifier and Type | Field and Description |
---|---|
protected ConnectionLog |
connectionLog |
protected java.util.Map<java.util.UUID,Server> |
dataServers |
protected InfoRequests |
infoRequests |
protected dagger.Lazy<InfoSystem> |
infoSystem |
protected ServerInfo |
serverInfo |
Constructor and Description |
---|
ConnectionSystem(ConnectionLog connectionLog,
InfoRequests infoRequests,
dagger.Lazy<InfoSystem> infoSystem,
ServerInfo serverInfo) |
Modifier and Type | Method and Description |
---|---|
void |
disable()
Performs disable actions for the subsystem
|
void |
enable()
Performs enable actions for the subsystem.
|
ConnectionLog |
getConnectionLog() |
java.util.List<Server> |
getDataServers() |
InfoRequest |
getInfoRequest(java.lang.String name) |
abstract java.lang.String |
getMainAddress() |
abstract boolean |
isServerAvailable() |
boolean |
isSetupAllowed() |
protected abstract Server |
selectServerForRequest(InfoRequest infoRequest) |
void |
sendInfoRequest(InfoRequest infoRequest) |
void |
sendInfoRequest(InfoRequest infoRequest,
Server toServer) |
abstract void |
sendWideInfoRequest(WideRequest infoRequest) |
void |
setSetupAllowed(boolean setupAllowed) |
protected final ConnectionLog connectionLog
protected final InfoRequests infoRequests
protected final dagger.Lazy<InfoSystem> infoSystem
protected final ServerInfo serverInfo
protected java.util.Map<java.util.UUID,Server> dataServers
public ConnectionSystem(ConnectionLog connectionLog, InfoRequests infoRequests, dagger.Lazy<InfoSystem> infoSystem, ServerInfo serverInfo)
public InfoRequest getInfoRequest(java.lang.String name)
public void setSetupAllowed(boolean setupAllowed)
protected abstract Server selectServerForRequest(InfoRequest infoRequest) throws NoServersException
NoServersException
public boolean isSetupAllowed()
public void sendInfoRequest(InfoRequest infoRequest) throws WebException
WebException
public void sendInfoRequest(InfoRequest infoRequest, Server toServer) throws WebException
WebException
public ConnectionLog getConnectionLog()
public abstract boolean isServerAvailable()
public abstract java.lang.String getMainAddress()
public abstract void sendWideInfoRequest(WideRequest infoRequest) throws NoServersException
NoServersException
public java.util.List<Server> getDataServers()
public void enable()
SubSystem