Return-Path: Delivered-To: apmail-incubator-directory-cvs-archive@www.apache.org Received: (qmail 93052 invoked from network); 17 Mar 2004 08:12:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Mar 2004 08:12:53 -0000 Received: (qmail 78738 invoked by uid 500); 17 Mar 2004 08:12:29 -0000 Delivered-To: apmail-incubator-directory-cvs-archive@incubator.apache.org Received: (qmail 78694 invoked by uid 500); 17 Mar 2004 08:12:29 -0000 Mailing-List: contact directory-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: directory-dev@incubator.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list directory-cvs@incubator.apache.org Received: (qmail 78678 invoked from network); 17 Mar 2004 08:12:28 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 17 Mar 2004 08:12:28 -0000 Received: (qmail 92997 invoked by uid 65534); 17 Mar 2004 08:12:51 -0000 Date: 17 Mar 2004 08:12:51 -0000 Message-ID: <20040317081251.92989.qmail@minotaur.apache.org> From: akarasulu@apache.org To: directory-cvs@incubator.apache.org Subject: svn commit: rev 9559 - in incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl: . conf src src/docbook src/images src/java src/java/org src/java/org/apache src/java/org/apache/eve src/java/org/apache/eve/encoder src/java/org/apache/eve/encoder/impl src/test src/test/org src/test/org/apache src/test/org/apache/eve src/test/org/apache/eve/encoder src/test/org/apache/eve/encoder/impl X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Wed Mar 17 00:12:51 2004 New Revision: 9559 Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/ (props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/block.xml (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/config.xml (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/debug.xml (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/maven.xml (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/project.properties (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/project.xml (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/docbook/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/images/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/AvalonLoggingMonitor.java (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/MerlinEncoderManager.java (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/MerlinEncoderManager.xconfig (contents, props changed) incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/eve/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/eve/encoder/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/eve/encoder/impl/ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/eve/encoder/impl/MerlinEncoderManagerTest.java (contents, props changed) Log: Adding the shell for the encoder. Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/block.xml ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/block.xml Wed Mar 17 00:12:51 2004 @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + encoder-manager + 5 + false + 5 + 2 + 1 + + + + + + + Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/config.xml ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/config.xml Wed Mar 17 00:12:51 2004 @@ -0,0 +1,7 @@ + + + + + + + Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/debug.xml ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/conf/debug.xml Wed Mar 17 00:12:51 2004 @@ -0,0 +1,10 @@ + + + + + + + + + + Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/maven.xml ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/maven.xml Wed Mar 17 00:12:51 2004 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/project.properties ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/project.properties Wed Mar 17 00:12:51 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/encoder/merlin-impl/project.xml ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/project.xml Wed Mar 17 00:12:51 2004 @@ -0,0 +1,195 @@ + + + ${basedir}/../../../project.xml + incubator-directory + eve-frontend-encoder-merlin-impl + + Eve's Frontend EncoderManager Implementation For Merlin + org.apache.eve.encoder.impl + SNAPSHOT + 2003 + + + + + + + + + + + + + junit + junit + 3.8.1 + http://junit.org + + + + + + regexp + regexp + 1.2 + http://jakarta.apache.org/regexp + + + + commons-lang + commons-lang + 2.0 + http://jakarta.apache.org/commons/lang + + + + commons-primitives + commons-primitives + 1.1-dev + http://jakarta.apache.org/commons/primitives + + + + commons-collections + commons-collections + 3.0 + http://jakarta.apache.org/commons/collections + + + + + + merlin + merlin-unit + 3.2.10 + + + + + + + + logkit + logkit + 1.2.2 + + + + avalon-framework + avalon-framework-api + 4.1.5 + http://avalon.apache.org/framework + + + + avalon-framework + avalon-framework-impl + 4.1.5 + http://avalon.apache.org/framework + + + + excalibur-instrument + excalibur-instrument + 1.0 + + + + excalibur-thread + excalibur-thread + 1.1.1 + + + + excalibur-event + excalibur-event + 1.0.3 + + + + excalibur-pool + excalibur-pool + 1.2 + + + + cornerstone-threads + cornerstone-threads-api + SNAPSHOT + + + + cornerstone-threads + cornerstone-threads-impl + SNAPSHOT + + + + + + incubator-directory + ldap-common + SNAPSHOT + http://incubator.apache.org/directory/ldap/common + + + + incubator-directory + eve-frontend-common-api + SNAPSHOT + + http://incubator.apache.org/directory/subprojects/eve/common/api + + + + + + + incubator-directory + eve-frontend-event-spi + SNAPSHOT + + http://incubator.apache.org/directory/subprojects/eve/event/spi + + + + + incubator-directory + eve-frontend-event-pojo-impl + SNAPSHOT + + http://incubator.apache.org/directory/subprojects/eve/event/pojo-impl + + + + + incubator-directory + eve-frontend-event-merlin-impl + SNAPSHOT + + http://incubator.apache.org/directory/subprojects/eve/event/merlin-impl + + + + + + incubator-directory + eve-frontend-encoder-spi + SNAPSHOT + + http://incubator.apache.org/directory/subprojects/eve/encoder/spi + + + + + incubator-directory + eve-frontend-encoder-pojo-impl + SNAPSHOT + + http://incubator.apache.org/directory/subprojects/eve/encoder/pojo-impl + + + + + + Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/AvalonLoggingMonitor.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/AvalonLoggingMonitor.java Wed Mar 17 00:12:51 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.encoder.impl ; + + +import org.apache.avalon.framework.logger.AbstractLogEnabled ; + + +/** + * A monitor that is Avalon LogEnabled and reports events on behalf of the + * EncoderManager component. + * + * @author + * Apache Directory Project + * @version $Rev$ + */ +public class AvalonLoggingMonitor extends AbstractLogEnabled +{ +} Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/MerlinEncoderManager.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/MerlinEncoderManager.java Wed Mar 17 00:12:51 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.encoder.impl ; + + +import org.apache.eve.thread.ThreadPool ; +import org.apache.eve.event.EventRouter ; +import org.apache.eve.seda.DefaultStageConfig ; + +import org.apache.eve.encoder.EncoderManager ; + +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 encoder manager. + * + * @avalon.component name="encoder-manager" lifestyle="singleton" + * @avalon.service type="org.apache.eve.encoder.EncoderManager" + * version="1.0" + * + * @author + * Apache Directory Project + * @version $Rev$ + */ +public class MerlinEncoderManager + implements + EncoderManager, + LogEnabled, + Initializable, + Configurable, + Serviceable, + Startable +{ + /** the Avalon logger enabled monitor for the EncoderManager */ + private AvalonLoggingMonitor monitor = new AvalonLoggingMonitor() ; + /** underlying wrapped EncoderManager implementation */ + private DefaultEncoderManager encoderManager = null ; + /** the stage configuration bean for the underlying EncoderManager */ + 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 ; + + + // ------------------------------------------------------------------------ + // EncoderManager Interface Methods + // ------------------------------------------------------------------------ + + + /* (non-Javadoc) + * @see org.apache.eve.processor.RequestProcessor#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/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/MerlinEncoderManager.xconfig ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/java/org/apache/eve/encoder/impl/MerlinEncoderManager.xconfig Wed Mar 17 00:12:51 2004 @@ -0,0 +1,6 @@ + + + + encoder-manager + encoder-manager + Added: incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/eve/encoder/impl/MerlinEncoderManagerTest.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/eve/frontend/encoder/merlin-impl/src/test/org/apache/eve/encoder/impl/MerlinEncoderManagerTest.java Wed Mar 17 00:12:51 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.encoder.impl ; + + +import org.apache.avalon.merlin.unit.AbstractMerlinTestCase ; + +import org.apache.eve.encoder.EncoderManager ; + + +/** + * Tests the Merlin component within Merlin! + * + * @author + * Apache Directory Project + * @version $Rev$ + */ +public class MerlinEncoderManagerTest extends AbstractMerlinTestCase +{ + EncoderManager encman = null ; + + + public MerlinEncoderManagerTest( String a_name ) + { + super( a_name ) ; + } + + + public static void main( String[] args ) + { + junit.textui.TestRunner.run( MerlinEncoderManagerTest.class ) ; + } + + + /* (non-Javadoc) + * @see junit.framework.TestCase#setUp() + */ + public void setUp() throws Exception + { + super.setUp() ; + encman = ( EncoderManager ) + resolve( "/server/encoder-manager" ) ; + } + + + /* (non-Javadoc) + * @see junit.framework.TestCase#tearDown() + */ + public void tearDown() + { + super.tearDown() ; + encman = null ; + } + + + public void testDummy() + { + encman.dummy() ; + } +}