public class MetaserverProcessor
extends java.lang.Object
MetaserverModel
instance. Queries are performed regularly every UPDATE_INTERVAL
.
Queries are stopped when the server selection GUI is left. Automatically
re-starts queries when the server selection GUI is shown again.Constructor and Description |
---|
MetaserverProcessor(@NotNull GuiStateManager guiStateManager,
@Nullable java.nio.file.Path metaserverCacheFile,
@NotNull MetaserverModel metaserverModel)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addMetaserver(@NotNull Metaserver metaserver)
Adds a metaserver to track.
|
void |
start()
Starts querying the added metaservers.
|
void |
stop()
Stops querying the added metaservers.
|
public MetaserverProcessor(@NotNull @NotNull GuiStateManager guiStateManager, @Nullable @Nullable java.nio.file.Path metaserverCacheFile, @NotNull @NotNull MetaserverModel metaserverModel)
guiStateManager
- the gui state manager to watchmetaserverCacheFile
- the metaserver cache file or null
to
not use a cache filemetaserverModel
- the metaserver model instance to updatepublic void addMetaserver(@NotNull @NotNull Metaserver metaserver)
metaserver
- the metaserver instance to querypublic void start()
public void stop()