notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1008 - in trunk/main/planet/web: server/src/main/net/dpml/web/server test/src/main/org/acme
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1008 - in trunk/main/planet/web: server/src/main/net/dpml/web/server test/src/main/org/acme
- Date: Wed, 1 Feb 2006 18:42:36 +0100
Author: mcconnell
Date: 2006-02-01 18:42:32 +0100 (Wed, 01 Feb 2006)
New Revision: 1008
Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/ContextHandler.java
trunk/main/planet/web/server/src/main/net/dpml/web/server/HashUserRealm.java
trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
trunk/main/planet/web/test/src/main/org/acme/TestFilter.java
Log:
housekeeping
Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/ContextHandler.java
===================================================================
---
trunk/main/planet/web/server/src/main/net/dpml/web/server/ContextHandler.java
2006-02-01 17:25:20 UTC (rev 1007)
+++
trunk/main/planet/web/server/src/main/net/dpml/web/server/ContextHandler.java
2006-02-01 17:42:32 UTC (rev 1008)
@@ -18,13 +18,17 @@
import net.dpml.transit.util.PropertyResolver;
/**
- * Context handler.
+ * Context handler with enhanced support for symbolic property
dereferencing.
*/
public class ContextHandler extends org.mortbay.jetty.handler.ContextHandler
{
- /**
- * @param path The base resource as a string.
- */
+ /**
+ * Set the context reosurce base. The supplied path argument
+ * may contain system property references as symbolic references in the
+ * form ${key} which will be expanded prior to value assignment.
+ *
+ * @param path the base resource as a string
+ */
public void setResourceBase( String path )
{
String resolved = PropertyResolver.resolve( path );
Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/HashUserRealm.java
===================================================================
---
trunk/main/planet/web/server/src/main/net/dpml/web/server/HashUserRealm.java
2006-02-01 17:25:20 UTC (rev 1007)
+++
trunk/main/planet/web/server/src/main/net/dpml/web/server/HashUserRealm.java
2006-02-01 17:42:32 UTC (rev 1008)
@@ -22,13 +22,16 @@
import net.dpml.transit.util.PropertyResolver;
/**
- * Hash user realm.
+ * Hash user realm with enhanced keystore resolution semantics.
*/
public class HashUserRealm extends org.mortbay.jetty.security.HashUserRealm
{
- /** Load realm users from properties file.
+ /**
+ * Load realm users from properties file.
* The property file maps usernames to password specs followed by
- * an optional comma separated list of role names.
+ * an optional comma separated list of role names. The implementation
+ * provides support for Transit local protocol resoution and system
+ * property symbolic expansion.
*
* @param config Filename or url of user properties file.
* @exception IOException is an IO error occurs
Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
===================================================================
--- trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
2006-02-01 17:25:20 UTC (rev 1007)
+++ trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
2006-02-01 17:42:32 UTC (rev 1008)
@@ -31,7 +31,7 @@
public class Server extends org.mortbay.jetty.Server
{
/**
- * Component context.
+ * Component context through which the server configuration uri may be
declared.
*/
public interface Context
{
@@ -55,6 +55,7 @@
{
super();
+ getLogger().debug( "commancing http server deployment" );
m_logger = logger;
m_context = context;
@@ -68,8 +69,7 @@
XmlConfiguration config = new XmlConfiguration( url );
config.configure( this );
}
-
- getLogger().info( "ready: " + this );
+ getLogger().debug( "http server is configured" );
}
private Logger getLogger()
Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
===================================================================
---
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
2006-02-01 17:25:20 UTC (rev 1007)
+++
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
2006-02-01 17:42:32 UTC (rev 1008)
@@ -22,10 +22,19 @@
import net.dpml.transit.util.PropertyResolver;
/**
- * SSL socket connector.
+ * SSL socket connector with enhanced keystore resolution semantics.
*/
public class SslSocketConnector extends
org.mortbay.jetty.security.SslSocketConnector
{
+ /**
+ * Set the location of the keystore. The implementation supports
+ * resolution of files using the Transit local resource protocol
+ * together with system property symbolic resolution. Following argument
+ * evalution the implementation delegates subsequent actions to the
+ * Jetty implementation class.
+ *
+ * @param keystore the keystore value
+ */
public void setKeystore( String keystore )
{
String resolved = PropertyResolver.resolve( keystore );
Modified: trunk/main/planet/web/test/src/main/org/acme/TestFilter.java
===================================================================
--- trunk/main/planet/web/test/src/main/org/acme/TestFilter.java
2006-02-01 17:25:20 UTC (rev 1007)
+++ trunk/main/planet/web/test/src/main/org/acme/TestFilter.java
2006-02-01 17:42:32 UTC (rev 1008)
@@ -1,17 +1,19 @@
-//========================================================================
-//$Id: TestFilter.java,v 1.5 2005/11/01 11:42:53 gregwilkins Exp $
-//Copyright 2004-2005 Mort Bay Consulting Pty. Ltd.
-//------------------------------------------------------------------------
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//http://www.apache.org/licenses/LICENSE-2.0
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-//========================================================================
+/*
+ * Copyright 2004-2005 Mort Bay Consulting Pty. Ltd.
+ * Copyright 2006 Stephen McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.acme;
@@ -25,52 +27,65 @@
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-/* ------------------------------------------------------------ */
-/** TestFilter.
+/**
+ * TestFilter.
* @author gregw
- *
*/
public class TestFilter implements Filter
{
- private ServletContext _context;
+ private ServletContext m_context;
- /* ------------------------------------------------------------ */
- /*
- * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
- */
- public void init(FilterConfig filterConfig) throws ServletException
+ /**
+ * Filter initialization.
+ * @param filterConfig the filter configuration
+ * @exception ServletException if a servlet error occurs
+ */
+ public void init( FilterConfig filterConfig ) throws ServletException
{
- _context= filterConfig.getServletContext();
+ m_context = filterConfig.getServletContext();
}
- /* ------------------------------------------------------------ */
- /*
- * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, javax.servlet.FilterChain)
+ /**
+ * Process a filter request.
+ * @param request the request
+ * @param response the response
+ * @param chain the filter chain
+ * @exception IOException if an I/O error occurs
+ * @exception ServletException if a servlet error occurs
+ * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
- public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
- throws IOException, ServletException
+ public void doFilter( ServletRequest request, ServletResponse response,
FilterChain chain )
+ throws IOException, ServletException
{
- Integer old_value=null;
+ Integer oldValue = null;
try
{
- old_value=(Integer)request.getAttribute("testFilter");
- Integer value=(old_value==null)?new Integer(1):new
Integer(old_value.intValue()+1);
+ oldValue = (Integer) request.getAttribute( "testFilter" );
+ Integer value = null;
+ if( null == oldValue )
+ {
+ value = new Integer(1);
+ }
+ else
+ {
+ value = new Integer( oldValue.intValue() + 1 );
+ }
- request.setAttribute("testFilter", value);
- _context.setAttribute("request"+request.hashCode(),value);
- chain.doFilter(request, response);
+ request.setAttribute( "testFilter", value );
+ m_context.setAttribute( "request" + request.hashCode(), value );
+ chain.doFilter( request, response );
}
finally
{
- request.setAttribute("testFilter", old_value);
- _context.setAttribute("request"+request.hashCode(),old_value);
+ request.setAttribute( "testFilter", oldValue );
+ m_context.setAttribute( "request" + request.hashCode(), oldValue
);
}
}
- /* ------------------------------------------------------------ */
- /*
- * @see javax.servlet.Filter#destroy()
- */
+ /**
+ * Destroy the instance.
+ * @see javax.servlet.Filter#destroy()
+ */
public void destroy()
{
}
- r1008 - in trunk/main/planet/web: server/src/main/net/dpml/web/server test/src/main/org/acme, mcconnell at BerliOS, 02/01/2006
Archive powered by MHonArc 2.6.24.