Class FileServerListProvider
- java.lang.Object
-
- in.dragonbra.javasteam.steam.discovery.FileServerListProvider
-
- All Implemented Interfaces:
IServerListProvider
public class FileServerListProvider extends java.lang.Object implements IServerListProvider
Server provider that stores servers in a file using protobuf.
-
-
Constructor Summary
Constructors Constructor Description FileServerListProvider(java.io.File file)Instantiates aFileServerListProviderobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ServerRecord>fetchServerList()Ask a provider to fetch any servers that it has availablevoidupdateServerList(java.util.List<ServerRecord> endpoints)Update the persistent list of endpoints
-
-
-
Constructor Detail
-
FileServerListProvider
public FileServerListProvider(java.io.File file)
Instantiates aFileServerListProviderobject.- Parameters:
file- the file that will store the servers
-
-
Method Detail
-
fetchServerList
public java.util.List<ServerRecord> fetchServerList()
Description copied from interface:IServerListProviderAsk a provider to fetch any servers that it has available- Specified by:
fetchServerListin interfaceIServerListProvider- Returns:
- A list of IPEndPoints representing servers
-
updateServerList
public void updateServerList(java.util.List<ServerRecord> endpoints)
Description copied from interface:IServerListProviderUpdate the persistent list of endpoints- Specified by:
updateServerListin interfaceIServerListProvider- Parameters:
endpoints- List of endpoints
-
-