Changeset 5
- Timestamp:
- 09/24/19 14:13:25 (5 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pom.xml
r4 r5 276 276 <groupId>org.apache.maven.plugins</groupId> 277 277 <artifactId>maven-dependency-plugin</artifactId> 278 < version>3.1.1</version>278 <!-- leave out version to help Eclipse workaround --> 279 279 <executions> 280 280 <execution> … … 346 346 <groupId>org.apache.maven.plugins</groupId> 347 347 <artifactId>maven-assembly-plugin</artifactId> 348 < version>2.4.1</version>348 <!-- leave out version to help Eclipse workaround --> 349 349 <configuration> 350 350 <!-- get all project dependencies --> -
src/main/java/geniusweb/partiesserver/websocket/PartiesListSocket.java
r1 r5 46 46 private AvailablePartiesRepo repo; 47 47 private SendBuffer outstream; 48 private static transient String hostport = ""; // cache 48 49 49 50 public PartiesListSocket() { … … 140 141 private String getIpAddressAndPort() 141 142 throws UnknownHostException, MalformedObjectNameException { 143 synchronized (hostport) { 144 if (hostport.isEmpty()) { 145 MBeanServer beanServer = ManagementFactory 146 .getPlatformMBeanServer(); 142 147 143 MBeanServer beanServer = ManagementFactory.getPlatformMBeanServer(); 148 Set<ObjectName> objectNames = beanServer.queryNames( 149 new ObjectName("*:type=Connector,*"), 150 Query.match(Query.attr("protocol"), 151 Query.value("HTTP/1.1"))); 144 152 145 Set<ObjectName> objectNames = beanServer.queryNames(146 new ObjectName("*:type=Connector,*"),147 Query.match(Query.attr("protocol"), Query.value("HTTP/1.1")));153 String host = InetAddress.getLocalHost().getHostAddress(); 154 String port = objectNames.iterator().next() 155 .getKeyProperty("port"); 148 156 149 String host = InetAddress.getLocalHost().getHostAddress();150 String port = objectNames.iterator().next().getKeyProperty("port");151 152 return host + ":" + port;157 hostport = host + ":" + port; 158 } 159 return hostport; 160 } 153 161 154 162 } -
src/main/webapp/index.jsp
r2 r5 18 18 Notice that these may contain files 19 19 with errors, and thus are not available for use (and not appear on the parties list). 20 21 <h2>Adding / Removing party classes</h2> 22 You can add and remove parties by dragging your jar files into and 23 out of the <code>partiesserver/partiesrepo</code> directory. This directory is inside the 24 tomcat directory which is created when the partiesserver is 25 started the first time. Changed, new or removed files are recognised automatically by the server and made available. 26 Be careful when you change this as this may disturb currently running sessions and tournaments. 27 <br> 28 For making or compiling new parties, please refer to the <a href="https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb"> GeniusWeb main page</a>. 20 <p> 21 For help and more info, please refer to the <a href="https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPartiesServer"> parties server page</a>. 29 22 30 23
Note:
See TracChangeset
for help on using the changeset viewer.