From: cvs@openprivacy.orgCVS update: talon/src/java/talon
Date: Friday February 9, 19101 @ 2:44
Author: burton
CVSWEB Options: -------------------
Main CVSWeb: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi
View this module: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon
-----------------------------------
Update of /usr/local/cvs/public/talon/src/java/talon
In directory giga:/tmp/cvs-serv23653/src/java/talon
Modified Files:
HandleManager.java Initializer.java
Log Message:
now possible to specify project via system property. HandleManager now can fetch impls...
*****************************************************************
File: talon/src/java/talon/HandleManager.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/HandleManager.java?annotate=1.2
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/HandleManager.java?rev=1.2&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/HandleManager.java.diff?r1=1.2&r2=1.1
-----------------------------------
Index: talon/src/java/talon/HandleManager.java
diff -u talon/src/java/talon/HandleManager.java:1.1 talon/src/java/talon/HandleManager.java:1.2
--- talon/src/java/talon/HandleManager.java:1.1 Wed Feb 7 01:59:33 2001
+++ talon/src/java/talon/HandleManager.java Fri Feb 9 02:44:13 2001
@@ -12,18 +12,17 @@
import java.util.*;
/**
- * Responsible for keeping
+ * Responsible for keeping track of handles and providign methods for fetching
+ * them.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: HandleManager.java,v 1.1 2001/02/07 09:59:33 burton Exp $
+ * @version $Id: HandleManager.java,v 1.2 2001/02/09 10:44:13 burton Exp $
*/
public class HandleManager {
- //TODO:
- // - need to fetch by interface, name
-
private static Hashtable byName = new Hashtable();
private static Hashtable byInterface = new Hashtable();
+ private static Hashtable byImplementation = new Hashtable();
public static void addComponentHandle( ComponentHandle handle ) {
@@ -37,6 +36,10 @@
byInterface.put( handle.getInterface(), handle );
}
+ //register by implementation
+ if ( handle.getImplementation() != null ) {
+ byInterface.put( handle.getImplementation(), handle );
+ }
}
@@ -47,4 +50,9 @@
public static ComponentHandle byInterface( String _interface ) {
return (ComponentHandle)byInterface.get( _interface );
}
+
+ public static ComponentHandle byImplementation( String _implementation ) {
+ return (ComponentHandle)byImplementation.get( _implementation );
+ }
+
}
*****************************************************************
File: talon/src/java/talon/Initializer.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/Initializer.java?annotate=1.5
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/Initializer.java?rev=1.5&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/Initializer.java.diff?r1=1.5&r2=1.4
-----------------------------------
Index: talon/src/java/talon/Initializer.java
diff -u talon/src/java/talon/Initializer.java:1.4 talon/src/java/talon/Initializer.java:1.5
--- talon/src/java/talon/Initializer.java:1.4 Thu Feb 8 22:31:42 2001
+++ talon/src/java/talon/Initializer.java Fri Feb 9 02:44:13 2001
@@ -18,7 +18,7 @@
* Handles intializing Talon and performing all startup procedures.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: Initializer.java,v 1.4 2001/02/09 06:31:42 burton Exp $
+ * @version $Id: Initializer.java,v 1.5 2001/02/09 10:44:13 burton Exp $
*/
public class Initializer {
@@ -43,7 +43,7 @@
* Initialize Talon if necessary.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: Initializer.java,v 1.4 2001/02/09 06:31:42 burton Exp $
+ * @version $Id: Initializer.java,v 1.5 2001/02/09 10:44:13 burton Exp $
*/
public static void init() {
@@ -55,12 +55,14 @@
try {
- //get the system properties...
+ //get the system property for the project or "talon" if none specified.
+ String project = System.getProperty( TALON_PROJECT_KEY );
+ if ( project == null ) {
+ project = "talon";
+ }
- //WARNING: what happens if this PropertyManager tries to use the
- //logger when it isn't in the ComponentFactory
PropertyManager pm = new FilePropertyManager( ComponentFactory.TALON_DEFAULT_PROPERTY_MANAGER,
- "talon" );
+ project );
ComponentFactory.putSingleton( ComponentFactory.TALON_DEFAULT_PROPERTY_MANAGER, (Component)pm );
@@ -127,7 +129,7 @@
* Return true if Talon is initialized.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: Initializer.java,v 1.4 2001/02/09 06:31:42 burton Exp $
+ * @version $Id: Initializer.java,v 1.5 2001/02/09 10:44:13 burton Exp $
*/
public static boolean isInitialized() {
return initialized;
@@ -137,7 +139,7 @@
* Return true if Talon is working.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: Initializer.java,v 1.4 2001/02/09 06:31:42 burton Exp $
+ * @version $Id: Initializer.java,v 1.5 2001/02/09 10:44:13 burton Exp $
*/
public static boolean isWorking() {
return working;
@@ -147,7 +149,7 @@
* Return true if Talon should be initialized.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: Initializer.java,v 1.4 2001/02/09 06:31:42 burton Exp $
+ * @version $Id: Initializer.java,v 1.5 2001/02/09 10:44:13 burton Exp $
*/
public static boolean shouldInitialize() {
return isWorking() == false && isInitialized() == false;
This archive was generated by hypermail 2b30 : Fri Feb 09 2001 - 02:45:14 PST