[jboss-cvs] JBossAS SVN: r62425 - branches/Branch_4_2/server/src/main/org/jboss/web.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 19 13:59:12 EDT 2007
Author: dimitris at jboss.org
Date: 2007-04-19 13:59:12 -0400 (Thu, 19 Apr 2007)
New Revision: 62425
Modified:
branches/Branch_4_2/server/src/main/org/jboss/web/WebServer.java
Log:
tidy up
Modified: branches/Branch_4_2/server/src/main/org/jboss/web/WebServer.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/web/WebServer.java 2007-04-19 17:57:08 UTC (rev 62424)
+++ branches/Branch_4_2/server/src/main/org/jboss/web/WebServer.java 2007-04-19 17:59:12 UTC (rev 62425)
@@ -54,7 +54,8 @@
*
* It is configured by calling any methods programmatically prior to startup.
* @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
- * @author <a href="mailto:Scott.Stark at org.jboss">Scott Stark</a>.
+ * @author <a href="mailto:Scott.Stark at org.jboss">Scott Stark</a>
+ * @authro <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
* @version $Revision$
* @see WebClassLoader
*/
@@ -65,6 +66,7 @@
// Attributes ----------------------------------------------------
private static Logger log = Logger.getLogger(WebServer.class);
+
/**
* The port the web server listens on
*/
@@ -75,6 +77,7 @@
* control over which interfaces accept connections.
*/
private InetAddress bindAddress;
+
/**
* The serverSocket listen queue depth
*/
@@ -84,26 +87,31 @@
* The map of class loaders registered with the web server
*/
private final ConcurrentReaderHashMap loaderMap = new ConcurrentReaderHashMap();
+
/**
* The web server http listening socket
*/
private ServerSocket server = null;
+
/**
* A flag indicating if the server should attempt to download classes from
* thread context class loader when a request arrives that does not have a
* class loader key prefix.
*/
private boolean downloadServerClasses = true;
+
/**
* A flag indicating if the server should attempt to download resources,
* i.e. resource paths that don't end in .class
*/
private boolean downloadResources = false;
+
/**
* The class wide mapping of type suffixes(class, txt) to their mime type
* string used as the Content-Type header for the vended classes/resources
*/
private static final Properties mimeTypes = new Properties();
+
/**
* The thread pool used to manage listening threads
*/
@@ -133,6 +141,7 @@
String address = null;
if (bindAddress != null)
address = bindAddress.getHostAddress();
+
return address;
}
@@ -174,6 +183,7 @@
{
if (backlog <= 0)
backlog = 50;
+
this.backlog = backlog;
}
@@ -224,13 +234,16 @@
{
if (threadPool == null)
threadPool = new BasicThreadPool("ClassLoadingPool");
+
try
{
server = new ServerSocket(port, backlog, bindAddress);
if (log.isDebugEnabled())
log.debug("Started server: " + server);
+
listen();
- }catch(java.net.BindException be)
+ }
+ catch(java.net.BindException be)
{
throw new Exception("Port "+port+" already in use.",be);
}
@@ -251,9 +264,7 @@
server = null;
srv.close();
}
- catch (Exception e)
- {
- }
+ catch (Exception ignore) {}
}
/**
More information about the jboss-cvs-commits
mailing list