this._multicastAnnouncements = multicastAnnouncements;
gMenuLogServiceAnnounce.setSelected(_multicastAnnouncements);
// TODO: implement constructor setting IP address of SocialServer from command-line value
+ if (serverSocial != null)
+ _serviceToAddressMap.put("ServerSocial", new LastSeenHost(new InetSocketAddress(serverSocial, Network.PORTS_SERVER_SOCIAL), LastSeenHost.STATE.STATIC));
}
/**
* Initialise listeners and other objects that require a reference to 'this'.
public ServerManagement initListeners() throws UnknownHostException {
LOGGER.addHandler(new TableModelHandler(this)); // send messages to the GUI log table
LOGGER.setUseParentHandlers(false); // don't send messages to the default error stream logger of the parent
- LOGGER.log(Level.INFO, "Server Management starting");
+ LOGGER.logp(Level.INFO, _title, null, "Server Management starting");
_udpLogServiceSA = new WSYD_SocketAddress(Network.PORTS_SERVER_LOG, Protocol.UDP);
_udpLogService = new NetworkServerUDP(_udpLogServiceSA, _title + "Log", _serviceToAddressMap, LOGGER);
// permit broadcasting to pseudo-host 'all' since this is multicast
_serviceToAddressMap.put("all", new LastSeenHost(new InetSocketAddress(Network.MULTICAST_IP, Network.PORTS_MULTICAST_DISCOVERY), LastSeenHost.STATE.STATIC));
+ // log any static entries in the service map
+ for (java.util.Map.Entry<String, LastSeenHost> entry: this._serviceToAddressMap.getEntrySet()) {
+ LastSeenHost host = entry.getValue();
+ if (host.state == LastSeenHost.STATE.STATIC)
+ LOGGER.logp(Level.FINER, _title, null, MessageFormat.format("Static Service: {0} = {1}:{2,number,#####}", entry.getKey(), host.address.getHostString(), host.address.getPort()));
+ }
+
ActionListener regularTasksActionListener = new ActionListener() {
// provide a way to read the current version of the parent process object's fields
ServerManagement owner;