Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2874 - in development/main/test/components/http: . api http impl impl/src/main/net/dpml/http/impl spi util

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2874 - in development/main/test/components/http: . api http impl impl/src/main/net/dpml/http/impl spi util
  • Date: Fri, 17 Jun 2005 15:57:50 -0400

Author: mcconnell AT dpml.net
Date: Fri Jun 17 15:57:49 2005
New Revision: 2874

Added:
development/main/test/components/http/api/
- copied from r2873, development/main/test/components/http/http/api/
development/main/test/components/http/build.xml
development/main/test/components/http/impl/
- copied from r2873, development/main/test/components/http/http/impl/
development/main/test/components/http/index.xml
development/main/test/components/http/spi/
- copied from r2873, development/main/test/components/http/http/spi/
development/main/test/components/http/util/
- copied from r2873, development/main/test/components/http/http/util/
Removed:
development/main/test/components/http/http/
Modified:

development/main/test/components/http/impl/src/main/net/dpml/http/impl/Ajp13Listener.java
Log:


Added: development/main/test/components/http/build.xml
==============================================================================
--- (empty file)
+++ development/main/test/components/http/build.xml Fri Jun 17 15:57:49
2005
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2005 Stephen J 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.
+-->
+
+<project name="dpml-http" default="default" basedir="."
+ xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="artifact:template:dpml/magic/reactor"/>
+
+</project>

Modified:
development/main/test/components/http/impl/src/main/net/dpml/http/impl/Ajp13Listener.java
==============================================================================
---
development/main/test/components/http/http/impl/src/main/net/dpml/http/impl/Ajp13Listener.java
(original)
+++
development/main/test/components/http/impl/src/main/net/dpml/http/impl/Ajp13Listener.java
Fri Jun 17 15:57:49 2005
@@ -16,7 +16,6 @@
package net.dpml.http.impl;

import net.dpml.activity.Startable;
-import net.dpml.logging.LogEnabled;
import net.dpml.logging.Logger;
import net.dpml.parameters.ParameterException;
import net.dpml.parameters.Parameterizable;
@@ -33,85 +32,113 @@
* @metro.service type="org.mortbay.http.HttpListener"
*/
public class Ajp13Listener extends org.mortbay.http.ajp.AJP13Listener
- implements Parameterizable, HttpListener, Startable
+ implements HttpListener, Startable
{
- private HttpService m_HttpServer;
- private Logger m_Logger;
+ public interface Context
+ {
+ HttpService getHttpService();
+ int getBufferReserve( int value );
+ int getBufferSize( int value );
+ int getConfidentialPort( int value );
+ String getConfidentialScheme( String value );
+ int getIntegralPort( int value );
+ String getIntegralScheme( String value );
+ String getHostName( String value );
+ int getPort( int value );
+ boolean getIdentifyListenerPolicy( boolean value );
+ }
+
+ private HttpService m_httpServer;
+ private Logger m_logger;

/**
- * @metro.logger name="http"
- * @metro.dependency type="net.dpml.http.HttpService"
- * key="server"
*/
- public Ajp13Listener( Logger logger, ServiceManager man )
+ public Ajp13Listener( Logger logger, Context context )
throws ServiceException
{
- m_Logger = logger;
- m_HttpServer = (HttpService) man.lookup( "server" );
- m_HttpServer.addListener( this );
- }
+ m_logger = logger;
+ m_httpServer = context.getHttpServer();
+ m_httpServer.addListener( this );

- public void parameterize( Parameters params )
- throws ParameterException
- {
- int reserve = params.getParameterAsInteger( "buffer-reserve", -1 );
+ int reserve = context.getBufferReserve( -1 );
if( reserve > 0 )
+ {
setBufferReserve( reserve );
+ }

- int size = params.getParameterAsInteger( "buffer-size", -1 );
+ int reserve = context.getBufferSize( -1 );
if( size > 0 )
+ {
setBufferSize( size );
+ }

- int confPort = params.getParameterAsInteger( "confidential-port", -1
);
+ int confPort = context.getConfidentialPort( -1 );
if( confPort > 0 )
+ {
setConfidentialPort( confPort );
+ }

- String confScheme = params.getParameter( "confidential-scheme", null
);
+ String confScheme = context.getConfidentialScheme( null );
if( confScheme != null )
+ {
setConfidentialScheme( confScheme );
+ }

- int integralPort = params.getParameterAsInteger( "integral-port", -1
);
+ int integralPort = context.getIntegralPort( -1 );
if( integralPort > 0 )
+ {
setIntegralPort( integralPort );
+ }

- String integralScheme = params.getParameter( "integral-scheme", null
);
+ String integralScheme = context.getIntegralScheme( null );
if( integralScheme != null )
+ {
setIntegralScheme( integralScheme );
+ }

- String host = params.getParameter( "hostname", null );
+ String host = context.getHostName( null );
try
{
if( host != null )
+ {
setHost( host );
- } catch( java.net.UnknownHostException e )
+ }
+ }
+ catch( java.net.UnknownHostException e )
{
throw new ParameterException( "Unknown hostname: " + host );
}

- int port = params.getParameterAsInteger( "port", 8080 );
+ int port = context.getPort( 8080 );
setPort( port );

- boolean identify = params.getParameterAsBoolean(
"identify-listener", false );
+ boolean identify = context.getIdentifyListenerPolicy( false );
setIdentifyListener( identify );
}

- public void start()
- throws Exception
+ public void start() throws Exception
{
- if( m_Logger.isDebugEnabled() )
- m_Logger.debug( "Starting socket: " + this );
+ if( m_logger.isDebugEnabled() )
+ {
+ m_logger.debug( "Starting socket: " + this );
+ }
if( ! isStarted() )
+ {
super.start();
+ }
}

- public void stop()
- throws InterruptedException
+ public void stop() throws InterruptedException
{
- if( m_Logger.isDebugEnabled() )
- m_Logger.debug( "Stopping socket: " + this );
+ if( m_logger.isDebugEnabled() )
+ {
+ m_logger.debug( "Stopping socket: " + this );
+ }
if( isStarted() )
+ {
super.stop();
- m_HttpServer.removeListener( this );
+ }
+ m_httpServer.removeListener( this );
}
}


Added: development/main/test/components/http/index.xml
==============================================================================
--- (empty file)
+++ development/main/test/components/http/index.xml Fri Jun 17 15:57:49
2005
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<index>
+
+ <import index="../index.xml"/>
+
+ <project basedir="api">
+ <info>
+ <group>dpml/planet/http</group>
+ <name>dpml-http-api</name>
+ <version>1.0.0</version>
+ <status>SNAPSHOT</status>
+ <types>
+ <type>jar</type>
+ </types>
+ </info>
+ <dependencies>
+ <include key="org.mortbay.jetty"/>
+ </dependencies>
+ </project>
+
+ <project basedir="spi">
+ <info>
+ <group>dpml/planet/http</group>
+ <name>dpml-http-spi</name>
+ <version>1.0.0</version>
+ <status>SNAPSHOT</status>
+ </info>
+ <dependencies>
+ <include key="dpml-http-api"/>
+ <include key="org.mortbay.jetty"/>
+ </dependencies>
+ </project>
+
+ <project basedir="util">
+ <info>
+ <group>dpml/planet/http</group>
+ <name>dpml-http-util</name>
+ <version>1.0.0</version>
+ <status>SNAPSHOT</status>
+ </info>
+ <dependencies>
+ <include key="dpml-http-api"/>
+ </dependencies>
+ </project>
+
+ <project basedir="impl">
+ <info>
+ <group>dpml/planet/http</group>
+ <name>dpml-http-impl</name>
+ <version>1.0.0</version>
+ <status>SNAPSHOT</status>
+ </info>
+ <dependencies>
+ <include key="dpml-activity-api"/>
+ <include key="dpml-logging-api"/>
+ <include key="dpml-configuration-api"/>
+ <include key="dpml-parameters-api"/>
+ <include key="dpml-http-spi"/>
+ <include key="dpml-http-util"/>
+ <include key="dpml-configuration-impl"/>
+ <include key="org.mortbay.jetty"/>
+ <include key="org.mortbay.jaas"/>
+ <include key="servletapi" runtime="true" build="true" />
+ <include key="commons-logging" build="false" runtime="true"/>
+ <include key="jsp-api" runtime="true" build="false" />
+ <include key="jasper-runtime" runtime="true" build="false" />
+ <include key="jasper-compiler" runtime="true" build="false" />
+ <include key="xercesImpl" runtime="true" build="false" />
+ </dependencies>
+ </project>
+
+
+ <resource>
+ <info>
+ <group>jetty</group>
+ <name>org.mortbay.jetty</name>
+ <version>5.1.1</version>
+ <types>
+ <type>jar</type>
+ </types>
+ </info>
+ <dependencies>
+ <include key="servletapi" />
+ </dependencies>
+ </resource>
+
+ <resource>
+ <info>
+ <group>jetty</group>
+ <name>org.mortbay.jaas</name>
+ <version>5.1.1</version>
+ <type>jar</type>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>servletapi</group>
+ <name>servletapi</name>
+ <version>2.3</version>
+ <type>jar</type>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>tomcat</group>
+ <name>jsp-api</name>
+ <version>5.0.18</version>
+ <type>jar</type>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>tomcat</group>
+ <name>jasper-runtime</name>
+ <version>5.0.25</version>
+ <type>jar</type>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>tomcat</group>
+ <name>jasper-compiler</name>
+ <version>5.0.25</version>
+ <type>jar</type>
+ </info>
+ </resource>
+
+</index>



  • svn commit: r2874 - in development/main/test/components/http: . api http impl impl/src/main/net/dpml/http/impl spi util, mcconnell, 06/17/2005

Archive powered by MHonArc 2.6.24.

Top of Page