Return-Path: Delivered-To: apmail-avalon-cvs-archive@www.apache.org Received: (qmail 47707 invoked from network); 25 Jan 2004 13:17:52 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Jan 2004 13:17:52 -0000 Received: (qmail 37925 invoked by uid 500); 25 Jan 2004 13:17:49 -0000 Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 37847 invoked by uid 500); 25 Jan 2004 13:17:49 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 37834 invoked from network); 25 Jan 2004 13:17:49 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 25 Jan 2004 13:17:49 -0000 Received: (qmail 47695 invoked by uid 1438); 25 Jan 2004 13:17:51 -0000 Date: 25 Jan 2004 13:17:51 -0000 Message-ID: <20040125131751.47694.qmail@minotaur.apache.org> From: mcconnell@apache.org To: avalon-cvs@apache.org Subject: cvs commit: avalon/repository/spi/src/java/org/apache/avalon/repository/provider InitialContext.java 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 mcconnell 2004/01/25 05:17:51 Modified: repository platform.xml repository/main/src/java/org/apache/avalon/repository/main DefaultInitialContext.java repository/spi/src/java/org/apache/avalon/repository/provider InitialContext.java Log: Improve the InitialContext interface and impl by exposing an operation to create a builder as opposed to the factory. This maintains the same benefits as before of isolating DefaultBuilder, but improves the interface usage because the builder also provides us with the constructed classloader. Revision Changes Path 1.6 +1 -1 avalon/repository/platform.xml Index: platform.xml =================================================================== RCS file: /home/cvs/avalon/repository/platform.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- platform.xml 24 Jan 2004 23:20:03 -0000 1.5 +++ platform.xml 25 Jan 2004 13:17:50 -0000 1.6 @@ -22,7 +22,7 @@ avalon-util avalon-util-defaults - 1.1 + 1.2-SNAPSHOT avalon-util 1.15 +9 -14 avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultInitialContext.java Index: DefaultInitialContext.java =================================================================== RCS file: /home/cvs/avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultInitialContext.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- DefaultInitialContext.java 24 Jan 2004 23:20:05 -0000 1.14 +++ DefaultInitialContext.java 25 Jan 2004 13:17:50 -0000 1.15 @@ -363,34 +363,29 @@ } /** - * Create a factory using a supplied artifact. + * Create a factory builder using a supplied artifact. * @param artifact the factory artifact - * @return the factory - * @exception Exception if a factory creation error occurs + * @return the factory builder + * @exception Exception if a builder creation error occurs */ - public Factory createFactory( Artifact artifact ) + public Builder newBuilder( Artifact artifact ) throws Exception { - Builder builder = - new DefaultBuilder( this, artifact ); - return builder.getFactory(); + return new DefaultBuilder( this, artifact ); } /** - * Create a factory using a supplied artifact. + * Create a factory builder using a supplied artifact. * @param classloader the parent classloader * @param artifact the factory artifact * @return the factory * @exception Exception if a factory creation error occurs */ - public Factory createFactory( ClassLoader classloader, Artifact artifact ) + public Builder newBuilder( ClassLoader classloader, Artifact artifact ) throws Exception { - Builder builder = - new DefaultBuilder( this, classloader, artifact ); - return builder.getFactory(); + return new DefaultBuilder( this, classloader, artifact ); } - // ------------------------------------------------------------------------ // implementation 1.6 +7 -7 avalon/repository/spi/src/java/org/apache/avalon/repository/provider/InitialContext.java Index: InitialContext.java =================================================================== RCS file: /home/cvs/avalon/repository/spi/src/java/org/apache/avalon/repository/provider/InitialContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- InitialContext.java 24 Jan 2004 23:20:05 -0000 1.5 +++ InitialContext.java 25 Jan 2004 13:17:51 -0000 1.6 @@ -69,22 +69,22 @@ Factory getInitialFactory(); /** - * Create a factory using a supplied artifact. + * Create a factory builder using a supplied artifact. * @param artifact the factory artifact - * @return the factory - * @exception Exception if a factory creation error occurs + * @return the factory builder + * @exception Exception if a builder creation error occurs */ - Factory createFactory( Artifact artifact ) + Builder newBuilder( Artifact artifact ) throws Exception; /** - * Create a factory using a supplied artifact. + * Create a factory builder using a supplied artifact. * @param classloader the parent classloader * @param artifact the factory artifact * @return the factory * @exception Exception if a factory creation error occurs */ - Factory createFactory( ClassLoader classloader, Artifact artifact ) + Builder newBuilder( ClassLoader classloader, Artifact artifact ) throws Exception; } --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org