mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Made discovery more reliable & added docs/tests
- Added unit tests - Added documentation for discovery classes - Improved error handling Tags: #story[1281]
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
package seng302.gameServer;
|
||||
|
||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import seng302.serverRepository.ServerListing;
|
||||
import seng302.serverRepository.ServerRepositoryClient;
|
||||
import seng302.discoveryServer.util.ServerListing;
|
||||
import seng302.discoveryServer.DiscoveryServerClient;
|
||||
|
||||
import javax.jmdns.JmDNS;
|
||||
import javax.jmdns.ServiceInfo;
|
||||
@@ -38,14 +35,14 @@ public class ServerAdvertiser {
|
||||
private static ServerAdvertiser instance = null;
|
||||
private static JmDNS jmdnsInstance = null;
|
||||
private ServiceInfo serviceInfo; // Note: Whenever this is changed, our service will be re-registered on the network.
|
||||
private ServerRepositoryClient repositoryClient;
|
||||
private DiscoveryServerClient repositoryClient;
|
||||
|
||||
private Hashtable<String ,String> props;
|
||||
|
||||
private ServerAdvertiser() throws IOException{
|
||||
jmdnsInstance = JmDNS.create(InetAddress.getByName(getLocalHostIp()));
|
||||
|
||||
repositoryClient = new ServerRepositoryClient();
|
||||
repositoryClient = new DiscoveryServerClient();
|
||||
|
||||
props = new Hashtable<>();
|
||||
props.put("map", "");
|
||||
|
||||
Reference in New Issue
Block a user