From: cvs@openprivacy.orgCVS update: sierra/src/java/org/openprivacy/sierra/util
Date: Friday February 23, 19101 @ 2:09
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/sierra/src/java/org/openprivacy/sierra/util
-----------------------------------
Update of /usr/local/cvs/public/sierra/src/java/org/openprivacy/sierra/util
In directory giga:/tmp/cvs-serv443/src/java/org/openprivacy/sierra/util
Modified Files:
SierraResources.java
Log Message:
Reputation objects should be correctly signed and reputation URIs are built from them.
*****************************************************************
File: sierra/src/java/org/openprivacy/sierra/util/SierraResources.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/util/SierraResources.java?annotate=1.3
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/util/SierraResources.java?rev=1.3&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/util/SierraResources.java.diff?r1=1.3&r2=1.2
-----------------------------------
Index: sierra/src/java/org/openprivacy/sierra/util/SierraResources.java
diff -u sierra/src/java/org/openprivacy/sierra/util/SierraResources.java:1.2 sierra/src/java/org/openprivacy/sierra/util/SierraResources.java:1.3
--- sierra/src/java/org/openprivacy/sierra/util/SierraResources.java:1.2 Mon Feb 19 15:38:24 2001
+++ sierra/src/java/org/openprivacy/sierra/util/SierraResources.java Fri Feb 23 02:09:48 2001
@@ -21,15 +21,18 @@
import java.net.*;
import java.security.Principal;
import java.util.*;
+import org.openprivacy.sierra.reputation.talon.interfaces.*;
import talon.*;
import talon.interfaces.*;
import talon.util.net.*;
/**
* Responsible for holding all resources need by Sierra as a global application.
+ * Also handles serving some objects needed as components but keeps application
+ * from dealing with Talon components.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SierraResources.java,v 1.2 2001/02/19 23:38:24 burton Exp $
+ * @version $Id: SierraResources.java,v 1.3 2001/02/23 10:09:48 burton Exp $
*/
public class SierraResources {
@@ -40,12 +43,6 @@
new ComponentHandle().setName( "sierra_reputation" );
/**
- * Default handle for creating a reference object.
- */
- public static final ComponentHandle REFERENCE_HANDLE =
- new ComponentHandle().setName( "sierra_reference" );
-
- /**
* Default handle for creating a payload object.
*/
public static final ComponentHandle PAYLOAD_HANDLE =
@@ -68,5 +65,36 @@
*/
public static final ComponentHandle STORE_HANDLE =
new ComponentHandle().setName( "sierra_store" );
+
+
+ public static final ComponentHandle REFERENCE_HANDLE =
+ new ComponentHandle().setInterface( "org.openprivacy.sierra.reputation.talon.interfaces.Reference" )
+ .setImplementation( "org.openprivacy.sierra.reputation.talon.implementations.SimpleReference" )
+ .setLifetime( ComponentHandle.LIFETIME_DEMAND );
+
+
+ /**
+ * Get the registered Talon Component "Reputation" with a "demand" lifetime.
+ *
+ * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
+ * @version $Id: SierraResources.java,v 1.3 2001/02/23 10:09:48 burton Exp $
+ */
+ public static Reputation getReputation() throws TalonException {
+
+ return (Reputation)ComponentFactory.getInstance( SierraResources.REPUTATION_HANDLE );
+
+ }
+
+ /**
+ * Get the registered Talon Component "Reference" with a "demand" lifetime.
+ *
+ * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
+ * @version $Id: SierraResources.java,v 1.3 2001/02/23 10:09:48 burton Exp $
+ */
+ public static Reference getReference() throws TalonException {
+
+ return (Reference)ComponentFactory.getInstance( SierraResources.REFERENCE_HANDLE );
+
+ }
}
This archive was generated by hypermail 2b30 : Fri Feb 23 2001 - 02:10:50 PST