()
| 179 | } |
| 180 | |
| 181 | public URL getServiceURL() { |
| 182 | URL result = null; |
| 183 | String protocol = secure ? "https" : "http"; |
| 184 | try { |
| 185 | result = new URL(protocol, "localhost", port, path); // default |
| 186 | result = new URL(protocol, InetAddress.getLocalHost() |
| 187 | .getHostAddress(), port, path); |
| 188 | } catch (MalformedURLException e) { |
| 189 | // accept default |
| 190 | } catch (UnknownHostException e) { |
| 191 | // accept default |
| 192 | } |
| 193 | return result; |
| 194 | } |
| 195 | |
| 196 | public void start() { |
| 197 | try { |