notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2883 - in development/main/test/components/http: . impl impl/src/main/net/dpml/http/impl
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2883 - in development/main/test/components/http: . impl impl/src/main/net/dpml/http/impl
- Date: Fri, 17 Jun 2005 17:35:48 -0400
Author: mcconnell AT dpml.net
Date: Fri Jun 17 17:35:48 2005
New Revision: 2883
Modified:
development/main/test/components/http/build.xml
development/main/test/components/http/impl/build.xml
development/main/test/components/http/impl/src/main/net/dpml/http/impl/MsieSslHandler.java
development/main/test/components/http/impl/src/main/net/dpml/http/impl/NcsaRequestLog.java
development/main/test/components/http/index.xml
Log:
updating to FT
Modified: development/main/test/components/http/build.xml
==============================================================================
--- development/main/test/components/http/build.xml (original)
+++ development/main/test/components/http/build.xml Fri Jun 17 17:35:48
2005
@@ -22,4 +22,16 @@
<transit:import uri="artifact:template:dpml/magic/reactor"/>
+ <target name="patch">
+ <replace token="m_Logger" value="m_logger" dir=".">
+ <include name="**/*.java"/>
+ </replace>
+ <replace token="m_Context" value="m_context" dir=".">
+ <include name="**/*.java"/>
+ </replace>
+ <replace token="m_Index" value="m_index" dir=".">
+ <include name="**/*.java"/>
+ </replace>
+ </target>
+
</project>
Modified: development/main/test/components/http/impl/build.xml
==============================================================================
--- development/main/test/components/http/impl/build.xml (original)
+++ development/main/test/components/http/impl/build.xml Fri Jun 17
17:35:48 2005
@@ -21,4 +21,11 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>
+ <target name="build" depends="standard.build">
+
+ <types xmlns="plugin:dpml/composition/dpml-composition-builder">
+ <type class="net.dpml.http.impl.Ajp13Listener" threadsafe="true"/>
+ </types>
+ </target>
+
</project>
Modified:
development/main/test/components/http/impl/src/main/net/dpml/http/impl/MsieSslHandler.java
==============================================================================
---
development/main/test/components/http/impl/src/main/net/dpml/http/impl/MsieSslHandler.java
(original)
+++
development/main/test/components/http/impl/src/main/net/dpml/http/impl/MsieSslHandler.java
Fri Jun 17 17:35:48 2005
@@ -16,73 +16,73 @@
package net.dpml.http.impl;
import net.dpml.activity.Startable;
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-import net.dpml.logging.LogEnabled;
import net.dpml.logging.Logger;
-import net.dpml.parameters.ParameterException;
-import net.dpml.parameters.Parameterizable;
-import net.dpml.parameters.Parameters;
import net.dpml.http.HttpContextService;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-import net.dpml.service.Serviceable;
/**
- * @metro.component name="http-msiessl-handler" lifestyle="singleton"
- * @metro.service type="org.mortbay.http.HttpHandler"
*/
public class MsieSslHandler
extends org.mortbay.http.handler.MsieSslHandler
implements Startable
{
- private Logger m_logger;
+ public interface Context
+ {
+ HttpContextService getHttpContext();
+ String getName();
+ int getHandlerIndex( int value );
+ String getUserAgentSubstring( String value );
+ }
+
+ private Logger m_logger;
private HttpContextService m_context;
- private int m_index;
+ private int m_index;
- /**
- * @metro.logger name="http"
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- * @metro.dependency type="net.dpml.http.HttpContextService"
- * key="http-context"
- */
- public MsieSslHandler( Logger logger, Context ctx, Parameters params,
ServiceManager man )
- throws ContextException, ServiceException
+ public MsieSslHandler( Logger logger, Context context )
{
m_logger = logger;
- m_context = (HttpContextService) man.lookup( "http-context" );
- String name = (String) ctx.get( "urn:metro:name" );
+ m_context = context.getHttpContext();
+ String name = (String) context.getName();
setName( name );
- m_index = params.getParameterAsInteger( "handler-index", -1 );
+ m_index = context.getHandlerIndex( -1 );
- String agent = params.getParameter( "user-agent-substring", null );
+ String agent = context.getUserAgentSubstring( null );
if( agent != null )
+ {
setUserAgentSubString( agent );
+ }
}
- public void start()
- throws Exception
+ public void start() throws Exception
{
if( m_index >= 0 )
+ {
m_context.addHandler( m_index, this );
+ }
else
+ {
m_context.addHandler( this );
+ }
if( m_logger.isDebugEnabled() )
+ {
m_logger.debug( "Starting MsieSslHandler: " + this );
- if( ! isStarted() )
+ }
+ if( false == isStarted() )
+ {
super.start();
+ }
}
- public void stop()
- throws InterruptedException
+ public void stop() throws InterruptedException
{
if( m_logger.isDebugEnabled() )
+ {
m_logger.debug( "Stopping MsieSslHandler: " + this );
+ }
if( isStarted() )
+ {
super.stop();
+ }
m_context.removeHandler( this );
}
}
Modified:
development/main/test/components/http/impl/src/main/net/dpml/http/impl/NcsaRequestLog.java
==============================================================================
---
development/main/test/components/http/impl/src/main/net/dpml/http/impl/NcsaRequestLog.java
(original)
+++
development/main/test/components/http/impl/src/main/net/dpml/http/impl/NcsaRequestLog.java
Fri Jun 17 17:35:48 2005
@@ -16,9 +16,6 @@
package net.dpml.http.impl;
import net.dpml.activity.Startable;
-import net.dpml.parameters.ParameterException;
-import net.dpml.parameters.Parameterizable;
-import net.dpml.parameters.Parameters;
import net.dpml.transit.util.PropertyResolver;
@@ -34,44 +31,63 @@
public class NcsaRequestLog extends NCSARequestLog
implements RequestLog
{
- public NcsaRequestLog(Parameters params)
+ public interface Context
{
- boolean append = params.getParameterAsBoolean( "append", false );
+ boolean getAppend( boolean value );
+ boolean getBuffered( boolean value );
+ boolean getExtended( boolean value );
+ boolean getPreferProxiedForAddress( boolean value );
+ String getFilename( String value );
+ String getLogDateFormat( String value );
+ String getIgnorePaths( String value );
+ String getLogTimeZone( String value );
+ int getRetainDays( int value );
+ }
+
+ public NcsaRequestLog( Context context )
+ {
+ boolean append = context.getAppend( false );
setAppend( append );
- boolean buffered = params.getParameterAsBoolean( "buffered", false );
+ boolean buffered = context.getBuffered( false );
setBuffered( buffered );
- boolean extended = params.getParameterAsBoolean( "extended", false );
+ boolean extended = context.getExtended( false );
setExtended( extended );
- boolean preferProxiedFor = params.getParameterAsBoolean(
"prefer-proxied-for", false );
+ boolean preferProxiedFor = context.getPreferProxiedForAddress( false
);
setPreferProxiedForAddress( preferProxiedFor );
- String filename = params.getParameter( "filename", null );
+ String filename = context.getFilename( null );
if( filename != null )
{
filename = PropertyResolver.resolve( System.getProperties(),
filename );
setFilename( filename );
}
- String dateformat = params.getParameter( "dateformat", null );
+ String dateformat = context.getLogDateFormat( null );
if( dateformat != null )
+ {
setLogDateFormat( dateformat );
+ }
- String ignorepaths = params.getParameter( "ignore-paths", null );
+ String ignorepaths = context.getIgnorePaths( null );
if( ignorepaths != null )
{
String[] paths = StringUtils.tokenize( ignorepaths );
setIgnorePaths( paths );
}
- String timezone = params.getParameter( "timezone", null );
+ String timezone = context.getLogTimeZone( null );
if( timezone != null )
+ {
setLogTimeZone( timezone );
+ }
- int retain = params.getParameterAsInteger( "retain-days", -1 );
+ int retain = context.getRetainDays( -1 );
if( retain > 0 )
+ {
setRetainDays( retain );
+ }
}
}
Modified: development/main/test/components/http/index.xml
==============================================================================
--- development/main/test/components/http/index.xml (original)
+++ development/main/test/components/http/index.xml Fri Jun 17 17:35:48
2005
@@ -67,10 +67,13 @@
<include key="jasper-runtime" runtime="true" build="false" />
<include key="jasper-compiler" runtime="true" build="false" />
<include key="xercesImpl" runtime="true" build="false" />
+ <include key="dpml-transit-main"/>
</dependencies>
+ <plugins>
+ <include key="dpml-composition-builder" runtime="false"/>
+ </plugins>
</project>
-
<resource>
<info>
<group>jetty</group>
- svn commit: r2883 - in development/main/test/components/http: . impl impl/src/main/net/dpml/http/impl, mcconnell, 06/17/2005
Archive powered by MHonArc 2.6.24.