You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/03/18 00:17:30 UTC
svn commit: rev 9574 - in incubator/directory/eve/trunk/eve/frontend: common/api/src/java/org/apache/eve/event decoder/pojo-impl/src/java/org/apache/eve/decoder/impl encoder/pojo-impl output output/merlin-impl output/merlin-impl/conf output/merlin-impl/src output/merlin-impl/src/docbook output/merlin-impl/src/images output/merlin-impl/src/java output/merlin-impl/src/java/org output/merlin-impl/src/java/org/apache output/merlin-impl/src/java/org/apache/eve output/merlin-impl/src/java/org/apache/eve/output output/merlin-impl/src/java/org/apache/eve/output/impl output/merlin-impl/src/test output/merlin-impl/src/test/org output/merlin-impl/src/test/org/apache output/merlin-impl/src/test/org/apache/eve output/merlin-impl/src/test/org/apache/eve/output output/merlin-impl/src/test/org/apache/eve/output/impl output/pojo-impl output/pojo-impl/src output/pojo-impl/src/java output/pojo-impl/src/java/org output/pojo-impl/src/java/org/apache output/pojo-impl/src/java/org/apache/eve output/pojo-impl/src/java/org/apache/eve/output output/pojo-impl/src/java/org/apache/eve/output/impl output/pojo-impl/src/test output/pojo-impl/src/test/org output/pojo-impl/src/test/org/apache output/pojo-impl/src/test/org/apache/eve output/pojo-impl/src/test/org/apache/eve/output output/pojo-impl/src/test/org/apache/eve/output/impl output/spi output/spi/src output/spi/src/docbook output/spi/src/images output/spi/src/java output/spi/src/java/org output/spi/src/java/org/apache output/spi/src/java/org/apache/eve output/spi/src/java/org/apache/eve/output processor/pojo-impl/src/java/org/apache/eve/processor/impl processor/spi/src/java/org/apache/eve/processor
Author: akarasulu
Date: Wed Mar 17 15:17:28 2004
New Revision: 9574
Added:
incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/ResponseEvent.java
incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/ResponseSubscriber.java
incubator/directory/eve/trunk/eve/frontend/output/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/ (props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/block.xml (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/config.xml (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/debug.xml (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/maven.xml (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/project.properties (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/project.xml (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/docbook/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/images/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/AvalonLoggingMonitor.java (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/MerlinOutputManager.java (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/MerlinOutputManager.xconfig (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/eve/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/eve/output/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/eve/output/impl/
incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/eve/output/impl/MerlinOutputManagerTest.java (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/ (props changed)
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/project.properties (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/project.xml (contents, props changed)
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/eve/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/eve/output/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/eve/output/impl/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/eve/output/impl/DefaultOutputManager.java
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/test/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/test/org/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/test/org/apache/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/test/org/apache/eve/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/test/org/apache/eve/output/
incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/test/org/apache/eve/output/impl/
incubator/directory/eve/trunk/eve/frontend/output/spi/ (props changed)
incubator/directory/eve/trunk/eve/frontend/output/spi/project.xml
incubator/directory/eve/trunk/eve/frontend/output/spi/src/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/docbook/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/images/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/apache/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/apache/eve/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/apache/eve/output/
incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/apache/eve/output/OutputManager.java
incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/HandlerTypeEnum.java
- copied, changed from rev 9514, incubator/directory/ldap/trunk/server/src/java/org/apache/ldap/server/protocol/HandlerTypeEnum.java
incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/RequestHandler.java
- copied, changed from rev 9514, incubator/directory/ldap/trunk/server/src/java/org/apache/ldap/server/protocol/RequestHandler.java
incubator/directory/eve/trunk/eve/frontend/processor/spi/src/java/org/apache/eve/processor/RequestProcessorMonitor.java
incubator/directory/eve/trunk/eve/frontend/processor/spi/src/java/org/apache/eve/processor/RequestProcessorMonitorAdapter.java
Modified:
incubator/directory/eve/trunk/eve/frontend/decoder/pojo-impl/src/java/org/apache/eve/decoder/impl/DefaultDecoderManager.java
incubator/directory/eve/trunk/eve/frontend/encoder/pojo-impl/project.xml
incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/DefaultRequestProcessor.java
Log:
Added stubs for the output, encoder and processor (protocol) components. We
still have much to do before we can fire the server up.
Added: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/ResponseEvent.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/ResponseEvent.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.event ;
+
+
+import org.apache.eve.listener.ClientKey ;
+import org.apache.ldap.common.message.Response ;
+
+
+/**
+ * An event used to denote the response to a client request. The response event
+ * only connotates that a response was made not delivered. The delivery is an
+ * output event.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ResponseEvent extends ClientEvent
+{
+ /** the LDAP response message */
+ private final Response response ;
+
+
+ /**
+ * Creates an event used to denote the response to a request before it is
+ * delivered.
+ *
+ * @param source the source that created this event
+ * @param clientKey the key of the client associated with this event
+ * @param response the LDAP response message
+ */
+ public ResponseEvent( Object source, ClientKey clientKey,
+ Response response )
+ {
+ super( source, clientKey ) ;
+ this.response = response ;
+ }
+
+
+ /**
+ * Gets the LDAP response message associated with this event.
+ *
+ * @return the LDAP response message associated with this event
+ */
+ public Response getResponse()
+ {
+ return response ;
+ }
+}
Added: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/ResponseSubscriber.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/ResponseSubscriber.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.event ;
+
+
+/**
+ * A subscriber that recieves ResponseEvents.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface ResponseSubscriber extends Subscriber
+{
+ /**
+ * ResponseEvent handler for this Subscriber type.
+ *
+ * @param event the response event to handle an incoming client request
+ */
+ void inform( ResponseEvent event ) ;
+}
Modified: incubator/directory/eve/trunk/eve/frontend/decoder/pojo-impl/src/java/org/apache/eve/decoder/impl/DefaultDecoderManager.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/decoder/pojo-impl/src/java/org/apache/eve/decoder/impl/DefaultDecoderManager.java (original)
+++ incubator/directory/eve/trunk/eve/frontend/decoder/pojo-impl/src/java/org/apache/eve/decoder/impl/DefaultDecoderManager.java Wed Mar 17 15:17:28 2004
@@ -27,7 +27,6 @@
import org.apache.ldap.common.message.Request ;
import org.apache.eve.event.InputEvent ;
-import org.apache.eve.event.Subscriber ;
import org.apache.eve.seda.StageConfig ;
import org.apache.eve.event.EventRouter ;
import org.apache.eve.seda.DefaultStage ;
@@ -38,7 +37,6 @@
import org.apache.eve.event.DisconnectEvent ;
import org.apache.eve.event.InputSubscriber ;
import org.apache.eve.decoder.DecoderManager ;
-import org.apache.eve.event.SubscriberMonitor ;
import org.apache.eve.event.ConnectSubscriber ;
import org.apache.eve.event.AbstractSubscriber ;
import org.apache.eve.event.DisconnectSubscriber ;
@@ -49,7 +47,6 @@
import org.apache.commons.codec.stateful.DecoderMonitor ;
import org.apache.commons.codec.stateful.DecoderCallback ;
import org.apache.commons.codec.stateful.StatefulDecoder ;
-import org.apache.commons.codec.stateful.DecoderMonitorAdapter ;
/**
@@ -73,10 +70,6 @@
private final Map decoders = new HashMap() ;
/** the monitor used for this decoder manager */
private DecoderManagerMonitor monitor ;
- /** the monitor used for this subscriber */
- private SubscriberMonitor subscriberMonitor ;
- /** the monitor for this decoder */
- private DecoderMonitor decoderMonitor ;
/**
@@ -91,22 +84,6 @@
this.router = router ;
this.monitor = new DecoderManagerMonitorAdapter() ;
- this.subscriberMonitor = new SubscriberMonitor()
- {
- public void failedOnInform( Subscriber subscriber,
- EventObject eventObject,
- Throwable throwable )
- {
- if ( monitor == null )
- {
- return ;
- }
-
- monitor.failedOnInform( subscriber, eventObject, throwable ) ;
- }
- } ;
-
- this.decoderMonitor = new DecoderMonitorAdapter() ;
router.subscribe( InputEvent.class, this ) ;
router.subscribe( ConnectEvent.class, this ) ;
Modified: incubator/directory/eve/trunk/eve/frontend/encoder/pojo-impl/project.xml
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/encoder/pojo-impl/project.xml (original)
+++ incubator/directory/eve/trunk/eve/frontend/encoder/pojo-impl/project.xml Wed Mar 17 15:17:28 2004
@@ -5,7 +5,7 @@
<id>eve-frontend-encoder-pojo-impl</id>
<name>Eve Frontend Encoder Manager Implementation</name>
- <package>org.apache.eve.processor.impl</package>
+ <package>org.apache.eve.encoder.impl</package>
<currentVersion>SNAPSHOT</currentVersion>
<inceptionYear>2003</inceptionYear>
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/block.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/block.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<container name="server">
+
+ <classloader>
+ <classpath>
+ <repository>
+
+ <!-- Non-Apache Dependencies -->
+
+ <resource id="junit:junit" version="3.8.1"/>
+
+ <!-- Avalon Dependencies -->
+
+ <resource id="avalon-framework:avalon-framework-api" version="4.1.5"/>
+ <resource id="avalon-framework:avalon-framework-impl" version="4.1.5"/>
+ <resource id="cornerstone-threads:cornerstone-threads-api" version="SNAPSHOT"/>
+ <resource id="cornerstone-threads:cornerstone-threads-impl" version="SNAPSHOT"/>
+ <resource id="excalibur-thread:excalibur-thread" version="1.1.1"/>
+ <resource id="excalibur-instrument:excalibur-instrument" version="1.0"/>
+ <resource id="excalibur-pool:excalibur-pool" version="1.2"/>
+ <resource id="excalibur-event:excalibur-event" version="1.0.3"/>
+
+ <!-- Jakarta & Commons Dependencies -->
+
+ <resource id="regexp:regexp" version="1.2"/>
+ <resource id="commons-collections:commons-collections" version="3.0"/>
+ <resource id="commons-primitives:commons-primitives" version="1.1-dev"/>
+ <resource id="commons-lang:commons-lang" version="2.0"/>
+
+ <!-- Directory Dependencies -->
+
+ <resource id="incubator-directory:ldap-common" version="SNAPSHOT"/>
+ <resource id="incubator-directory:eve-frontend-common-api" version="SNAPSHOT"/>
+
+ <!-- Eve Decoder -->
+ <resource id="incubator-directory:eve-frontend-event-spi" version="SNAPSHOT"/>
+ <resource id="incubator-directory:eve-frontend-event-pojo-impl" version="SNAPSHOT"/>
+ <resource id="incubator-directory:eve-frontend-event-merlin-impl" version="SNAPSHOT"/>
+
+ <!-- Eve Decoder -->
+ <resource id="incubator-directory:eve-frontend-output-spi" version="SNAPSHOT"/>
+ <resource id="incubator-directory:eve-frontend-output-pojo-impl" version="SNAPSHOT"/>
+
+ </repository>
+ </classpath>
+ </classloader>
+
+ <component name="thread-manager"
+ class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager">
+ <configuration>
+ <thread-group>
+ <name>output-manager</name>
+ <priority>5</priority>
+ <is-daemon>false</is-daemon>
+ <max-threads>5</max-threads>
+ <min-threads>2</min-threads>
+ <min-spare-threads>1</min-spare-threads>
+ </thread-group>
+ </configuration>
+ </component>
+
+ <component
+ name="event-router"
+ class="org.apache.eve.event.MerlinEventRouter"/>
+ <component
+ name="output-manager"
+ class="org.apache.eve.output.impl.MerlinOutputManager"/>
+</container>
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/config.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/config.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<targets>
+ <target path="/server/output-manager">
+ <categories priority="DEBUG"/>
+ </target>
+</targets>
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/debug.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/conf/debug.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<kernel>
+
+ <!-- logging system parameters -->
+ <logging target="default" priority="DEBUG" name="kernel">
+ </logging>
+
+</kernel>
+
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/maven.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/maven.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,42 @@
+<project
+ default="jar:install"
+ xmlns:j="jelly:core"
+ xmlns:u="jelly:util"
+ xmlns:ant="jelly:ant"
+ xmlns:maven="jelly:maven"
+ xmlns:m="maven"
+ xmlns:deploy="deploy">
+
+ <preGoal name="site">
+ <attainGoal name="docbook:transform"/>
+ </preGoal>
+
+ <postGoal name="site">
+ <attainGoal name="server:copy-images"/>
+ </postGoal>
+
+ <goal name="server:copy-images">
+ <copy toDir="target/docs/images">
+ <fileSet dir="${basedir}/src/images">
+ <include name="*.gif"/>
+ </fileSet>
+ </copy>
+ </goal>
+
+ <goal name="cleanall">
+ <attainGoal name="clean"/>
+ <delete dir="home"/>
+ </goal>
+
+ <postGoal name="java:compile">
+ <attainGoal name="avalon:meta"/>
+ </postGoal>
+
+ <postGoal name="aspectj:compile">
+ <attainGoal name="avalon:meta"/>
+ </postGoal>
+
+ <goal name="components">
+ <j:import inherit="true" uri="components.xml"/>
+ </goal>
+</project>
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/project.properties
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/project.properties Wed Mar 17 15:17:28 2004
@@ -0,0 +1,5 @@
+maven.xdoc.date=left
+maven.xdoc.version=${pom.currentVersion}
+merlin.debug=true
+merlin.info=true
+merlin.override=conf/config.xml
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/project.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/project.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+ <extend>${basedir}/../../../project.xml</extend>
+ <groupId>incubator-directory</groupId>
+ <id>eve-frontend-output-merlin-impl</id>
+
+ <name>Eve's Frontend OutputManager Implementation For Merlin</name>
+ <package>org.apache.eve.output.impl</package>
+ <currentVersion>SNAPSHOT</currentVersion>
+ <inceptionYear>2003</inceptionYear>
+
+ <shortDescription>
+ </shortDescription>
+
+ <description>
+ </description>
+
+ <dependencies>
+
+ <!-- Non-Apache Dependencies -->
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <url>http://junit.org</url>
+ </dependency>
+
+ <!-- Jakarta & Commons Dependencies -->
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.0</version>
+ <url>http://jakarta.apache.org/commons/lang</url>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.0</version>
+ <url>http://jakarta.apache.org/commons/collections</url>
+ </dependency>
+
+ <!-- Avalon Dependencies -->
+
+ <dependency>
+ <groupId>merlin</groupId>
+ <artifactId>merlin-unit</artifactId>
+ <version>3.2.10</version>
+ </dependency>
+
+ <!-- for some reason this is needed for merlin-unit tests -->
+ <!-- but it is not needed when when using command line merlin -->
+ <!-- within the block.xml's classloader directive -->
+
+ <dependency>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ <version>1.2.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework-api</artifactId>
+ <version>4.1.5</version>
+ <url>http://avalon.apache.org/framework</url>
+ </dependency>
+
+ <dependency>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework-impl</artifactId>
+ <version>4.1.5</version>
+ <url>http://avalon.apache.org/framework</url>
+ </dependency>
+
+ <dependency>
+ <groupId>excalibur-instrument</groupId>
+ <artifactId>excalibur-instrument</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>excalibur-thread</groupId>
+ <artifactId>excalibur-thread</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>excalibur-event</groupId>
+ <artifactId>excalibur-event</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>excalibur-pool</groupId>
+ <artifactId>excalibur-pool</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>cornerstone-threads</groupId>
+ <artifactId>cornerstone-threads-api</artifactId>
+ <version>SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>cornerstone-threads</groupId>
+ <artifactId>cornerstone-threads-impl</artifactId>
+ <version>SNAPSHOT</version>
+ </dependency>
+
+ <!-- Directory Dependencies -->
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-common-api</artifactId>
+ <version>SNAPSHOT</version>
+ <url>
+ http://incubator.apache.org/directory/subprojects/eve/common/api
+ </url>
+ </dependency>
+
+ <!-- Eve Event -->
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-event-spi</artifactId>
+ <version>SNAPSHOT</version>
+ <url>
+ http://incubator.apache.org/directory/subprojects/eve/event/spi
+ </url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-event-pojo-impl</artifactId>
+ <version>SNAPSHOT</version>
+ <url>
+ http://incubator.apache.org/directory/subprojects/eve/event/pojo-impl
+ </url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-event-merlin-impl</artifactId>
+ <version>SNAPSHOT</version>
+ <url>
+ http://incubator.apache.org/directory/subprojects/eve/event/merlin-impl
+ </url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-output-spi</artifactId>
+ <version>SNAPSHOT</version>
+ <url>
+ http://incubator.apache.org/directory/subprojects/eve/output/spi
+ </url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-output-pojo-impl</artifactId>
+ <version>SNAPSHOT</version>
+ <url>
+ http://incubator.apache.org/directory/subprojects/eve/output/pojo-impl
+ </url>
+ </dependency>
+
+ </dependencies>
+</project>
+
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/AvalonLoggingMonitor.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/AvalonLoggingMonitor.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.output.impl ;
+
+
+import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+
+
+/**
+ * A monitor that is Avalon LogEnabled and reports events on behalf of the
+ * OutputManager component.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class AvalonLoggingMonitor extends AbstractLogEnabled
+{
+}
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/MerlinOutputManager.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/MerlinOutputManager.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.output.impl ;
+
+
+import org.apache.eve.thread.ThreadPool ;
+import org.apache.eve.event.EventRouter ;
+import org.apache.eve.seda.DefaultStageConfig ;
+
+import org.apache.eve.output.OutputManager ;
+
+import org.apache.avalon.framework.logger.Logger ;
+import org.apache.avalon.framework.logger.LogEnabled ;
+import org.apache.avalon.framework.activity.Startable ;
+import org.apache.avalon.framework.service.Serviceable ;
+import org.apache.avalon.framework.service.ServiceManager ;
+import org.apache.avalon.framework.activity.Initializable ;
+import org.apache.avalon.framework.service.ServiceException ;
+import org.apache.avalon.framework.configuration.Configurable ;
+import org.apache.avalon.framework.configuration.Configuration ;
+import org.apache.avalon.framework.configuration.ConfigurationException ;
+
+import org.apache.avalon.cornerstone.services.threads.ThreadManager ;
+
+
+/**
+ * A Merlin output manager.
+ *
+ * @avalon.component name="output-manager" lifestyle="singleton"
+ * @avalon.service type="org.apache.eve.output.OutputManager"
+ * version="1.0"
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class MerlinOutputManager
+ implements
+ OutputManager,
+ LogEnabled,
+ Initializable,
+ Configurable,
+ Serviceable,
+ Startable
+{
+ /** the Avalon logger enabled monitor for the OutputManager */
+ private AvalonLoggingMonitor monitor = new AvalonLoggingMonitor() ;
+ /** underlying wrapped OutputManager implementation */
+ private DefaultOutputManager outputManager = null ;
+ /** the stage configuration bean for the underlying OutputManager */
+ private DefaultStageConfig stageConfig = null ;
+ /** the event router we depend on to recieve and publish events */
+ private EventRouter router = null ;
+ /** the thread manager used to access the thread pool used by the stage */
+ private ThreadManager tm = null ;
+
+
+ // ------------------------------------------------------------------------
+ // OutputManager Interface Methods
+ // ------------------------------------------------------------------------
+
+
+ /* (non-Javadoc)
+ * @see org.apache.eve.output.OuputManager#dummy()
+ */
+ public void dummy()
+ {
+ }
+
+
+ // ------------------------------------------------------------------------
+ // Avalon Life Cycle Methods ( in order of occurrence )
+ // ------------------------------------------------------------------------
+
+
+ /* (non-Javadoc)
+ * @see org.apache.avalon.framework.logger.LogEnabled#
+ * enableLogging(org.apache.avalon.framework.logger.Logger)
+ */
+ public void enableLogging( Logger logger )
+ {
+ monitor.enableLogging( logger ) ;
+ }
+
+
+ /**
+ * @avalon.dependency type="org.apache.eve.event.EventRouter"
+ * key="event-router" version="1.0"
+ * @avalon.dependency key="thread-manager"
+ * type="org.apache.avalon.cornerstone.services.threads.ThreadManager"
+ *
+ * @see org.apache.avalon.framework.service.Serviceable#service(
+ * org.apache.avalon.framework.service.ServiceManager)
+ */
+ public void service( ServiceManager manager ) throws ServiceException
+ {
+ tm = ( ThreadManager ) manager.lookup( "thread-manager" ) ;
+ router = ( EventRouter ) manager.lookup( "event-router" ) ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.avalon.framework.configuration.Configurable#configure(
+ * org.apache.avalon.framework.configuration.Configuration)
+ */
+ public void configure( Configuration config )
+ throws ConfigurationException
+ {
+ String name = config.getChild( "stage-name" ).getValue() ;
+ String pool = config.getChild( "thread-pool" ).getValue() ;
+
+ final org.apache.avalon.excalibur.thread.ThreadPool excaliburPool =
+ tm.getThreadPool( pool ) ;
+ ThreadPool tp = new ThreadPool()
+ {
+ public void execute( Runnable runnable )
+ {
+ excaliburPool.execute( runnable ) ;
+ }
+ } ;
+
+ stageConfig = new DefaultStageConfig( name, tp ) ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.avalon.framework.activity.Initializable#initialize()
+ */
+ public void initialize() throws Exception
+ {
+ //throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.avalon.framework.activity.Startable#start()
+ */
+ public void start() throws Exception
+ {
+ //throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.avalon.framework.activity.Startable#stop()
+ */
+ public void stop() throws Exception
+ {
+ //throw new NotImplementedException( "STUB" ) ;
+ }
+}
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/MerlinOutputManager.xconfig
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/java/org/apache/eve/output/impl/MerlinOutputManager.xconfig Wed Mar 17 15:17:28 2004
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<configuration>
+ <stage-name>output-manager</stage-name>
+ <thread-pool>output-manager</thread-pool>
+</configuration>
Added: incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/eve/output/impl/MerlinOutputManagerTest.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/merlin-impl/src/test/org/apache/eve/output/impl/MerlinOutputManagerTest.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.output.impl ;
+
+
+import org.apache.avalon.merlin.unit.AbstractMerlinTestCase ;
+
+import org.apache.eve.output.OutputManager ;
+
+
+/**
+ * Tests the Merlin component within Merlin!
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class MerlinOutputManagerTest extends AbstractMerlinTestCase
+{
+ OutputManager outman = null ;
+
+
+ public MerlinOutputManagerTest( String a_name )
+ {
+ super( a_name ) ;
+ }
+
+
+ public static void main( String[] args )
+ {
+ junit.textui.TestRunner.run( MerlinOutputManagerTest.class ) ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ public void setUp() throws Exception
+ {
+ super.setUp() ;
+ outman = ( OutputManager )
+ resolve( "/server/output-manager" ) ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ public void tearDown()
+ {
+ super.tearDown() ;
+ outman = null ;
+ }
+
+
+ public void testDummy()
+ {
+ outman.dummy() ;
+ }
+}
Added: incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/project.properties
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/project.properties Wed Mar 17 15:17:28 2004
@@ -0,0 +1,2 @@
+maven.xdoc.date=left
+maven.xdoc.version=${pom.currentVersion}
Added: incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/project.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/project.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+ <extend>${basedir}/../../../project.xml</extend>
+ <groupId>incubator-directory</groupId>
+ <id>eve-frontend-output-pojo-impl</id>
+
+ <name>Eve Frontend Manager Implementation</name>
+ <package>org.apache.eve.output.impl</package>
+ <currentVersion>SNAPSHOT</currentVersion>
+ <inceptionYear>2003</inceptionYear>
+
+ <shortDescription>
+ Eve's Frontend Output Manager Implementation
+ </shortDescription>
+
+ <description>
+ </description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <url>http://junit.org</url>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://jakarta.apache.org/commons/lang</url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-common-api</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://directory.apache.org</url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-event-spi</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://directory.apache.org</url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-event-pojo-impl</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://directory.apache.org</url>
+ </dependency>
+
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-output-spi</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://directory.apache.org</url>
+ </dependency>
+
+ </dependencies>
+</project>
+
Added: incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/eve/output/impl/DefaultOutputManager.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/pojo-impl/src/java/org/apache/eve/output/impl/DefaultOutputManager.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.output.impl ;
+
+
+import org.apache.eve.output.OutputManager ;
+
+
+/**
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class DefaultOutputManager implements OutputManager
+{
+ /* (non-Javadoc)
+ * @see org.apache.eve.output.OutputManager#dummy()
+ */
+ public void dummy()
+ {
+ }
+}
Added: incubator/directory/eve/trunk/eve/frontend/output/spi/project.xml
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/spi/project.xml Wed Mar 17 15:17:28 2004
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+ <extend>${basedir}/../../../project.xml</extend>
+ <groupId>incubator-directory</groupId>
+ <id>eve-frontend-output-spi</id>
+
+ <name>Eve Frontend Output Manager SPI</name>
+ <package>org.apache.eve.output</package>
+ <currentVersion>SNAPSHOT</currentVersion>
+ <inceptionYear>2003</inceptionYear>
+
+ <shortDescription>Eve Frontend Output Manager SPI</shortDescription>
+
+ <description>
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>incubator-directory</groupId>
+ <artifactId>eve-frontend-common-api</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://incubator.apache.org/directory/subprojects/eve/frontend/common/api</url>
+ </dependency>
+ </dependencies>
+</project>
+
Added: incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/apache/eve/output/OutputManager.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/output/spi/src/java/org/apache/eve/output/OutputManager.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.output ;
+
+
+/**
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev: 9555 $
+ */
+public interface OutputManager
+{
+ void dummy() ;
+}
Modified: incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/DefaultRequestProcessor.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/DefaultRequestProcessor.java (original)
+++ incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/DefaultRequestProcessor.java Wed Mar 17 15:17:28 2004
@@ -17,7 +17,18 @@
package org.apache.eve.processor.impl ;
+import java.util.EventObject ;
+
+import org.apache.eve.event.AbstractSubscriber ;
+import org.apache.eve.event.EventRouter ;
+import org.apache.eve.event.RequestEvent ;
+import org.apache.eve.event.RequestSubscriber ;
import org.apache.eve.processor.RequestProcessor ;
+import org.apache.eve.processor.RequestProcessorMonitor;
+import org.apache.eve.processor.RequestProcessorMonitorAdapter;
+import org.apache.eve.seda.DefaultStage ;
+import org.apache.eve.seda.StageConfig ;
+import org.apache.ldap.common.message.Request;
/**
@@ -27,14 +38,55 @@
* Apache Directory Project</a>
* @version $Rev$
*/
-public class DefaultRequestProcessor implements RequestProcessor
+public class DefaultRequestProcessor extends DefaultStage
+ implements RequestProcessor, RequestSubscriber
{
+ private final EventRouter router ;
+ private RequestProcessorMonitor monitor = null ;
+
+
+ public DefaultRequestProcessor( EventRouter router, StageConfig config )
+ {
+ super( config ) ;
+
+ this.router = router ;
+ this.router.subscribe( RequestEvent.class, this ) ;
+ this.monitor = new RequestProcessorMonitorAdapter() ;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.eve.event.RequestSubscriber#inform(
+ * org.apache.eve.event.RequestEvent)
+ */
+ public void inform( RequestEvent event )
+ {
+ Request request = event.getRequest() ;
+
+
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
+ */
+ public void inform( EventObject event )
+ {
+ try
+ {
+ AbstractSubscriber.inform( this, event ) ;
+ }
+ catch ( Throwable t )
+ {
+ monitor.failedOnInform( this, event, t ) ;
+ }
+ }
+
+
/* (non-Javadoc)
* @see org.apache.eve.processor.RequestProcessor#dummy()
*/
public void dummy()
{
- // @todo Auto-generated method stub
-
}
}
Copied: incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/HandlerTypeEnum.java (from rev 9514, incubator/directory/ldap/trunk/server/src/java/org/apache/ldap/server/protocol/HandlerTypeEnum.java)
==============================================================================
--- incubator/directory/ldap/trunk/server/src/java/org/apache/ldap/server/protocol/HandlerTypeEnum.java (original)
+++ incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/HandlerTypeEnum.java Wed Mar 17 15:17:28 2004
@@ -1,193 +1,5 @@
/*
- * Apache License
- * Version 2.0, January 2004
- * http://www.apache.org/licenses/
- *
- * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- * 1. Definitions.
- *
- * "License" shall mean the terms and conditions for use, reproduction,
- * and distribution as defined by Sections 1 through 9 of this document.
- *
- * "Licensor" shall mean the copyright owner or entity authorized by
- * the copyright owner that is granting the License.
- *
- * "Legal Entity" shall mean the union of the acting entity and all
- * other entities that control, are controlled by, or are under common
- * control with that entity. For the purposes of this definition,
- * "control" means (i) the power, direct or indirect, to cause the
- * direction or management of such entity, whether by contract or
- * otherwise, or (ii) ownership of fifty percent (50%) or more of the
- * outstanding shares, or (iii) beneficial ownership of such entity.
- *
- * "You" (or "Your") shall mean an individual or Legal Entity
- * exercising permissions granted by this License.
- *
- * "Source" form shall mean the preferred form for making modifications,
- * including but not limited to software source code, documentation
- * source, and configuration files.
- *
- * "Object" form shall mean any form resulting from mechanical
- * transformation or translation of a Source form, including but
- * not limited to compiled object code, generated documentation,
- * and conversions to other media types.
- *
- * "Work" shall mean the work of authorship, whether in Source or
- * Object form, made available under the License, as indicated by a
- * copyright notice that is included in or attached to the work
- * (an example is provided in the Appendix below).
- *
- * "Derivative Works" shall mean any work, whether in Source or Object
- * form, that is based on (or derived from) the Work and for which the
- * editorial revisions, annotations, elaborations, or other modifications
- * represent, as a whole, an original work of authorship. For the purposes
- * of this License, Derivative Works shall not include works that remain
- * separable from, or merely link (or bind by name) to the interfaces of,
- * the Work and Derivative Works thereof.
- *
- * "Contribution" shall mean any work of authorship, including
- * the original version of the Work and any modifications or additions
- * to that Work or Derivative Works thereof, that is intentionally
- * submitted to Licensor for inclusion in the Work by the copyright owner
- * or by an individual or Legal Entity authorized to submit on behalf of
- * the copyright owner. For the purposes of this definition, "submitted"
- * means any form of electronic, verbal, or written communication sent
- * to the Licensor or its representatives, including but not limited to
- * communication on electronic mailing lists, source code control systems,
- * and issue tracking systems that are managed by, or on behalf of, the
- * Licensor for the purpose of discussing and improving the Work, but
- * excluding communication that is conspicuously marked or otherwise
- * designated in writing by the copyright owner as "Not a Contribution."
- *
- * "Contributor" shall mean Licensor and any individual or Legal Entity
- * on behalf of whom a Contribution has been received by Licensor and
- * subsequently incorporated within the Work.
- *
- * 2. Grant of Copyright License. Subject to the terms and conditions of
- * this License, each Contributor hereby grants to You a perpetual,
- * worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- * copyright license to reproduce, prepare Derivative Works of,
- * publicly display, publicly perform, sublicense, and distribute the
- * Work and such Derivative Works in Source or Object form.
- *
- * 3. Grant of Patent License. Subject to the terms and conditions of
- * this License, each Contributor hereby grants to You a perpetual,
- * worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- * (except as stated in this section) patent license to make, have made,
- * use, offer to sell, sell, import, and otherwise transfer the Work,
- * where such license applies only to those patent claims licensable
- * by such Contributor that are necessarily infringed by their
- * Contribution(s) alone or by combination of their Contribution(s)
- * with the Work to which such Contribution(s) was submitted. If You
- * institute patent litigation against any entity (including a
- * cross-claim or counterclaim in a lawsuit) alleging that the Work
- * or a Contribution incorporated within the Work constitutes direct
- * or contributory patent infringement, then any patent licenses
- * granted to You under this License for that Work shall terminate
- * as of the date such litigation is filed.
- *
- * 4. Redistribution. You may reproduce and distribute copies of the
- * Work or Derivative Works thereof in any medium, with or without
- * modifications, and in Source or Object form, provided that You
- * meet the following conditions:
- *
- * (a) You must give any other recipients of the Work or
- * Derivative Works a copy of this License; and
- *
- * (b) You must cause any modified files to carry prominent notices
- * stating that You changed the files; and
- *
- * (c) You must retain, in the Source form of any Derivative Works
- * that You distribute, all copyright, patent, trademark, and
- * attribution notices from the Source form of the Work,
- * excluding those notices that do not pertain to any part of
- * the Derivative Works; and
- *
- * (d) If the Work includes a "NOTICE" text file as part of its
- * distribution, then any Derivative Works that You distribute must
- * include a readable copy of the attribution notices contained
- * within such NOTICE file, excluding those notices that do not
- * pertain to any part of the Derivative Works, in at least one
- * of the following places: within a NOTICE text file distributed
- * as part of the Derivative Works; within the Source form or
- * documentation, if provided along with the Derivative Works; or,
- * within a display generated by the Derivative Works, if and
- * wherever such third-party notices normally appear. The contents
- * of the NOTICE file are for informational purposes only and
- * do not modify the License. You may add Your own attribution
- * notices within Derivative Works that You distribute, alongside
- * or as an addendum to the NOTICE text from the Work, provided
- * that such additional attribution notices cannot be construed
- * as modifying the License.
- *
- * You may add Your own copyright statement to Your modifications and
- * may provide additional or different license terms and conditions
- * for use, reproduction, or distribution of Your modifications, or
- * for any such Derivative Works as a whole, provided Your use,
- * reproduction, and distribution of the Work otherwise complies with
- * the conditions stated in this License.
- *
- * 5. Submission of Contributions. Unless You explicitly state otherwise,
- * any Contribution intentionally submitted for inclusion in the Work
- * by You to the Licensor shall be under the terms and conditions of
- * this License, without any additional terms or conditions.
- * Notwithstanding the above, nothing herein shall supersede or modify
- * the terms of any separate license agreement you may have executed
- * with Licensor regarding such Contributions.
- *
- * 6. Trademarks. This License does not grant permission to use the trade
- * names, trademarks, service marks, or product names of the Licensor,
- * except as required for reasonable and customary use in describing the
- * origin of the Work and reproducing the content of the NOTICE file.
- *
- * 7. Disclaimer of Warranty. Unless required by applicable law or
- * agreed to in writing, Licensor provides the Work (and each
- * Contributor provides its Contributions) on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied, including, without limitation, any warranties or conditions
- * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- * PARTICULAR PURPOSE. You are solely responsible for determining the
- * appropriateness of using or redistributing the Work and assume any
- * risks associated with Your exercise of permissions under this License.
- *
- * 8. Limitation of Liability. In no event and under no legal theory,
- * whether in tort (including negligence), contract, or otherwise,
- * unless required by applicable law (such as deliberate and grossly
- * negligent acts) or agreed to in writing, shall any Contributor be
- * liable to You for damages, including any direct, indirect, special,
- * incidental, or consequential damages of any character arising as a
- * result of this License or out of the use or inability to use the
- * Work (including but not limited to damages for loss of goodwill,
- * work stoppage, computer failure or malfunction, or any and all
- * other commercial damages or losses), even if such Contributor
- * has been advised of the possibility of such damages.
- *
- * 9. Accepting Warranty or Additional Liability. While redistributing
- * the Work or Derivative Works thereof, You may choose to offer,
- * and charge a fee for, acceptance of support, warranty, indemnity,
- * or other liability obligations and/or rights consistent with this
- * License. However, in accepting such obligations, You may act only
- * on Your own behalf and on Your sole responsibility, not on behalf
- * of any other Contributor, and only if You agree to indemnify,
- * defend, and hold each Contributor harmless for any liability
- * incurred by, or claims asserted against, such Contributor by reason
- * of your accepting any such warranty or additional liability.
- *
- * END OF TERMS AND CONDITIONS
- *
- * APPENDIX: How to apply the Apache License to your work.
- *
- * To apply the Apache License to your work, attach the following
- * boilerplate notice, with the fields enclosed by brackets "[]"
- * replaced with your own identifying information. (Don't include
- * the brackets!) The text should be enclosed in the appropriate
- * comment syntax for the file format. We also recommend that a
- * file or class name and description of purpose be included on the
- * same "printed page" as the copyright notice for easier
- * identification within third-party archives.
- *
- * Copyright [yyyy] [name of copyright owner]
+ * Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -202,32 +14,21 @@
* limitations under the License.
*
*/
-
-/*
- * $Id: HandlerTypeEnum.java,v 1.2 2003/08/22 21:15:56 akarasulu Exp $
- *
- * -- (c) LDAPd Group --
- * -- Please refer to the LICENSE.txt file in the root directory of --
- * -- any LDAPd project for copyright and distribution information. --
- *
- */
-
-package org.apache.ldap.server.protocol ;
+package org.apache.eve.processor.impl ;
-import org.apache.avalon.framework.ValuedEnum ;
+import org.apache.commons.lang.enum.ValuedEnum ;
/**
* Valued enumeration for the three types of handlers: NOREPLY, SINGLEREPLY,
* and SEARCH.
*
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision: 1.2 $
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
*/
-public class HandlerTypeEnum
- extends ValuedEnum
+public class HandlerTypeEnum extends ValuedEnum
{
/** Value for noreply enumeration type */
public static final int NOREPLY_VAL = 0 ;
@@ -238,23 +39,23 @@
/** Enum for noreply type */
public static final HandlerTypeEnum NOREPLY =
- new HandlerTypeEnum("NOREPLY", NOREPLY_VAL) ;
+ new HandlerTypeEnum( "NOREPLY", NOREPLY_VAL ) ;
/** Enum for singlereply type */
public static final HandlerTypeEnum SINGLEREPLY =
- new HandlerTypeEnum("SINGLEREPLY", SINGLEREPLY_VAL) ;
+ new HandlerTypeEnum( "SINGLEREPLY", SINGLEREPLY_VAL ) ;
/** Enum for search type */
public static final HandlerTypeEnum SEARCH =
- new HandlerTypeEnum("SEARCH", SEARCH_VAL) ;
+ new HandlerTypeEnum( "SEARCH", SEARCH_VAL ) ;
/**
* Enables creation of constants in this class only.
*
- * @param a_name the name of the enum
- * @param a_value the value of the enum
+ * @param name the name of the enum
+ * @param value the value of the enum
*/
- private HandlerTypeEnum( String a_name, int a_value )
+ private HandlerTypeEnum( String name, int value )
{
- super( a_name, a_value ) ;
+ super( name, value ) ;
}
}
Copied: incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/RequestHandler.java (from rev 9514, incubator/directory/ldap/trunk/server/src/java/org/apache/ldap/server/protocol/RequestHandler.java)
==============================================================================
--- incubator/directory/ldap/trunk/server/src/java/org/apache/ldap/server/protocol/RequestHandler.java (original)
+++ incubator/directory/eve/trunk/eve/frontend/processor/pojo-impl/src/java/org/apache/eve/processor/impl/RequestHandler.java Wed Mar 17 15:17:28 2004
@@ -1,193 +1,5 @@
/*
- * Apache License
- * Version 2.0, January 2004
- * http://www.apache.org/licenses/
- *
- * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- * 1. Definitions.
- *
- * "License" shall mean the terms and conditions for use, reproduction,
- * and distribution as defined by Sections 1 through 9 of this document.
- *
- * "Licensor" shall mean the copyright owner or entity authorized by
- * the copyright owner that is granting the License.
- *
- * "Legal Entity" shall mean the union of the acting entity and all
- * other entities that control, are controlled by, or are under common
- * control with that entity. For the purposes of this definition,
- * "control" means (i) the power, direct or indirect, to cause the
- * direction or management of such entity, whether by contract or
- * otherwise, or (ii) ownership of fifty percent (50%) or more of the
- * outstanding shares, or (iii) beneficial ownership of such entity.
- *
- * "You" (or "Your") shall mean an individual or Legal Entity
- * exercising permissions granted by this License.
- *
- * "Source" form shall mean the preferred form for making modifications,
- * including but not limited to software source code, documentation
- * source, and configuration files.
- *
- * "Object" form shall mean any form resulting from mechanical
- * transformation or translation of a Source form, including but
- * not limited to compiled object code, generated documentation,
- * and conversions to other media types.
- *
- * "Work" shall mean the work of authorship, whether in Source or
- * Object form, made available under the License, as indicated by a
- * copyright notice that is included in or attached to the work
- * (an example is provided in the Appendix below).
- *
- * "Derivative Works" shall mean any work, whether in Source or Object
- * form, that is based on (or derived from) the Work and for which the
- * editorial revisions, annotations, elaborations, or other modifications
- * represent, as a whole, an original work of authorship. For the purposes
- * of this License, Derivative Works shall not include works that remain
- * separable from, or merely link (or bind by name) to the interfaces of,
- * the Work and Derivative Works thereof.
- *
- * "Contribution" shall mean any work of authorship, including
- * the original version of the Work and any modifications or additions
- * to that Work or Derivative Works thereof, that is intentionally
- * submitted to Licensor for inclusion in the Work by the copyright owner
- * or by an individual or Legal Entity authorized to submit on behalf of
- * the copyright owner. For the purposes of this definition, "submitted"
- * means any form of electronic, verbal, or written communication sent
- * to the Licensor or its representatives, including but not limited to
- * communication on electronic mailing lists, source code control systems,
- * and issue tracking systems that are managed by, or on behalf of, the
- * Licensor for the purpose of discussing and improving the Work, but
- * excluding communication that is conspicuously marked or otherwise
- * designated in writing by the copyright owner as "Not a Contribution."
- *
- * "Contributor" shall mean Licensor and any individual or Legal Entity
- * on behalf of whom a Contribution has been received by Licensor and
- * subsequently incorporated within the Work.
- *
- * 2. Grant of Copyright License. Subject to the terms and conditions of
- * this License, each Contributor hereby grants to You a perpetual,
- * worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- * copyright license to reproduce, prepare Derivative Works of,
- * publicly display, publicly perform, sublicense, and distribute the
- * Work and such Derivative Works in Source or Object form.
- *
- * 3. Grant of Patent License. Subject to the terms and conditions of
- * this License, each Contributor hereby grants to You a perpetual,
- * worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- * (except as stated in this section) patent license to make, have made,
- * use, offer to sell, sell, import, and otherwise transfer the Work,
- * where such license applies only to those patent claims licensable
- * by such Contributor that are necessarily infringed by their
- * Contribution(s) alone or by combination of their Contribution(s)
- * with the Work to which such Contribution(s) was submitted. If You
- * institute patent litigation against any entity (including a
- * cross-claim or counterclaim in a lawsuit) alleging that the Work
- * or a Contribution incorporated within the Work constitutes direct
- * or contributory patent infringement, then any patent licenses
- * granted to You under this License for that Work shall terminate
- * as of the date such litigation is filed.
- *
- * 4. Redistribution. You may reproduce and distribute copies of the
- * Work or Derivative Works thereof in any medium, with or without
- * modifications, and in Source or Object form, provided that You
- * meet the following conditions:
- *
- * (a) You must give any other recipients of the Work or
- * Derivative Works a copy of this License; and
- *
- * (b) You must cause any modified files to carry prominent notices
- * stating that You changed the files; and
- *
- * (c) You must retain, in the Source form of any Derivative Works
- * that You distribute, all copyright, patent, trademark, and
- * attribution notices from the Source form of the Work,
- * excluding those notices that do not pertain to any part of
- * the Derivative Works; and
- *
- * (d) If the Work includes a "NOTICE" text file as part of its
- * distribution, then any Derivative Works that You distribute must
- * include a readable copy of the attribution notices contained
- * within such NOTICE file, excluding those notices that do not
- * pertain to any part of the Derivative Works, in at least one
- * of the following places: within a NOTICE text file distributed
- * as part of the Derivative Works; within the Source form or
- * documentation, if provided along with the Derivative Works; or,
- * within a display generated by the Derivative Works, if and
- * wherever such third-party notices normally appear. The contents
- * of the NOTICE file are for informational purposes only and
- * do not modify the License. You may add Your own attribution
- * notices within Derivative Works that You distribute, alongside
- * or as an addendum to the NOTICE text from the Work, provided
- * that such additional attribution notices cannot be construed
- * as modifying the License.
- *
- * You may add Your own copyright statement to Your modifications and
- * may provide additional or different license terms and conditions
- * for use, reproduction, or distribution of Your modifications, or
- * for any such Derivative Works as a whole, provided Your use,
- * reproduction, and distribution of the Work otherwise complies with
- * the conditions stated in this License.
- *
- * 5. Submission of Contributions. Unless You explicitly state otherwise,
- * any Contribution intentionally submitted for inclusion in the Work
- * by You to the Licensor shall be under the terms and conditions of
- * this License, without any additional terms or conditions.
- * Notwithstanding the above, nothing herein shall supersede or modify
- * the terms of any separate license agreement you may have executed
- * with Licensor regarding such Contributions.
- *
- * 6. Trademarks. This License does not grant permission to use the trade
- * names, trademarks, service marks, or product names of the Licensor,
- * except as required for reasonable and customary use in describing the
- * origin of the Work and reproducing the content of the NOTICE file.
- *
- * 7. Disclaimer of Warranty. Unless required by applicable law or
- * agreed to in writing, Licensor provides the Work (and each
- * Contributor provides its Contributions) on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied, including, without limitation, any warranties or conditions
- * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- * PARTICULAR PURPOSE. You are solely responsible for determining the
- * appropriateness of using or redistributing the Work and assume any
- * risks associated with Your exercise of permissions under this License.
- *
- * 8. Limitation of Liability. In no event and under no legal theory,
- * whether in tort (including negligence), contract, or otherwise,
- * unless required by applicable law (such as deliberate and grossly
- * negligent acts) or agreed to in writing, shall any Contributor be
- * liable to You for damages, including any direct, indirect, special,
- * incidental, or consequential damages of any character arising as a
- * result of this License or out of the use or inability to use the
- * Work (including but not limited to damages for loss of goodwill,
- * work stoppage, computer failure or malfunction, or any and all
- * other commercial damages or losses), even if such Contributor
- * has been advised of the possibility of such damages.
- *
- * 9. Accepting Warranty or Additional Liability. While redistributing
- * the Work or Derivative Works thereof, You may choose to offer,
- * and charge a fee for, acceptance of support, warranty, indemnity,
- * or other liability obligations and/or rights consistent with this
- * License. However, in accepting such obligations, You may act only
- * on Your own behalf and on Your sole responsibility, not on behalf
- * of any other Contributor, and only if You agree to indemnify,
- * defend, and hold each Contributor harmless for any liability
- * incurred by, or claims asserted against, such Contributor by reason
- * of your accepting any such warranty or additional liability.
- *
- * END OF TERMS AND CONDITIONS
- *
- * APPENDIX: How to apply the Apache License to your work.
- *
- * To apply the Apache License to your work, attach the following
- * boilerplate notice, with the fields enclosed by brackets "[]"
- * replaced with your own identifying information. (Don't include
- * the brackets!) The text should be enclosed in the appropriate
- * comment syntax for the file format. We also recommend that a
- * file or class name and description of purpose be included on the
- * same "printed page" as the copyright notice for easier
- * identification within third-party archives.
- *
- * Copyright [yyyy] [name of copyright owner]
+ * Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -202,17 +14,7 @@
* limitations under the License.
*
*/
-
-/*
- * $Id: RequestHandler.java,v 1.2 2003/08/22 21:15:56 akarasulu Exp $
- *
- * -- (c) LDAPd Group --
- * -- Please refer to the LICENSE.txt file in the root directory of --
- * -- any LDAPd project for copyright and distribution information. --
- *
- */
-
-package org.apache.ldap.server.protocol ;
+package org.apache.eve.processor.impl ;
import org.apache.ldap.common.message.MessageTypeEnum ;
@@ -221,9 +23,9 @@
/**
* Root of all request handler types.
*
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision: 1.2 $
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
*/
public interface RequestHandler
{
Added: incubator/directory/eve/trunk/eve/frontend/processor/spi/src/java/org/apache/eve/processor/RequestProcessorMonitor.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/processor/spi/src/java/org/apache/eve/processor/RequestProcessorMonitor.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.processor ;
+
+
+import java.util.EventObject ;
+
+import org.apache.eve.event.Subscriber ;
+
+
+/**
+ * A monitor interface for the RequestProcessor.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface RequestProcessorMonitor
+{
+ /**
+ * Monitors failures while processing inform methods if any.
+ *
+ * @param subscriber the subscriber
+ * @param event the event being delievered
+ * @param t the throwable that prevented delivery
+ */
+ void failedOnInform( Subscriber subscriber, EventObject event,
+ Throwable t ) ;
+}
Added: incubator/directory/eve/trunk/eve/frontend/processor/spi/src/java/org/apache/eve/processor/RequestProcessorMonitorAdapter.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/processor/spi/src/java/org/apache/eve/processor/RequestProcessorMonitorAdapter.java Wed Mar 17 15:17:28 2004
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.apache.eve.processor ;
+
+
+import java.util.EventObject ;
+
+import org.apache.eve.event.Subscriber ;
+
+
+/**
+ * A convenient adapter for request processors monitors. Exceptional conditions
+ * are transformed into and reported as runtime exceptions.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class RequestProcessorMonitorAdapter implements RequestProcessorMonitor
+{
+
+ /* @see org.apache.eve.processor.RequestProcessorMonitor#failedOnInform(
+ * org.apache.eve.event.Subscriber, java.util.EventObject,
+ * java.lang.Throwable)
+ */
+ public void failedOnInform( Subscriber subscriber, EventObject event,
+ Throwable t )
+ {
+ throw new RuntimeException( t ) ;
+ }
+}