CVS update: talon/src/java/talon

From: cvs@openprivacy.org
Date: Wed Mar 07 2001 - 19:28:29 PST

  • Next message: cvs@openprivacy.org: "CVS update: talon/src/java/talon/tests"

    Date: Wednesday March 7, 19101 @ 19:28
    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-serv15819/src/java/talon

    Modified Files:
            BaseComponent.java Component.java
    Log Message:
    created a Type reference so that we can refer to objects generically.

    *****************************************************************
    File: talon/src/java/talon/BaseComponent.java

    CVSWEB Options: -------------------

    CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/BaseComponent.java?annotate=1.6

    CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/BaseComponent.java?rev=1.6&content-type=text/x-cvsweb-markup

    CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/BaseComponent.java.diff?r1=1.6&r2=1.5

    -----------------------------------

    Index: talon/src/java/talon/BaseComponent.java
    diff -u talon/src/java/talon/BaseComponent.java:1.5 talon/src/java/talon/BaseComponent.java:1.6
    --- talon/src/java/talon/BaseComponent.java:1.5 Fri Mar 2 19:16:57 2001
    +++ talon/src/java/talon/BaseComponent.java Wed Mar 7 19:28:29 2001
    @@ -21,18 +21,19 @@
      * develoeprs as a base for the Components they create.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BaseComponent.java,v 1.5 2001/03/03 03:16:57 burton Exp $
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
      */
     public abstract class BaseComponent implements Component {
     
     
         private ComponentHandle handle = null;
         private URI componentReference = null;
    + private URI typeReference = null;
         
         /**
          * @see Component
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BaseComponent.java,v 1.5 2001/03/03 03:16:57 burton Exp $
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public ComponentHandle getComponentHandle() {
             return this.handle;
    @@ -41,7 +42,7 @@
         /**
          * @see Component
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BaseComponent.java,v 1.5 2001/03/03 03:16:57 burton Exp $
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public void setComponentHandle( ComponentHandle handle ) {
             this.handle = handle;
    @@ -50,7 +51,7 @@
         /**
          * @see Component
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BaseComponent.java,v 1.5 2001/03/03 03:16:57 burton Exp $
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public URI getComponentReference() {
     
    @@ -81,11 +82,25 @@
             
         }
     
    +
    + /**
    + * @see Component
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
    + */
    + public URI getTypeReference() {
    +
    + if ( this.typeReference == null ) {
    + this.typeReference = new URI( "talon:///component/" + getClass().getName() );
    + }
    +
    + return this.typeReference;
    + }
         
         /**
          * @see Component
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BaseComponent.java,v 1.5 2001/03/03 03:16:57 burton Exp $
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public Logger getLogger() {
             try {
    @@ -104,7 +119,7 @@
          * Default impl of toString() just dumps handle info...
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BaseComponent.java,v 1.5 2001/03/03 03:16:57 burton Exp $
    + * @version $Id: BaseComponent.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public String toString() {
             return this.getComponentHandle().toString();

    *****************************************************************
    File: talon/src/java/talon/Component.java

    CVSWEB Options: -------------------

    CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/Component.java?annotate=1.6

    CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/Component.java?rev=1.6&content-type=text/x-cvsweb-markup

    CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/Component.java.diff?r1=1.6&r2=1.5

    -----------------------------------

    Index: talon/src/java/talon/Component.java
    diff -u talon/src/java/talon/Component.java:1.5 talon/src/java/talon/Component.java:1.6
    --- talon/src/java/talon/Component.java:1.5 Thu Mar 1 14:42:45 2001
    +++ talon/src/java/talon/Component.java Wed Mar 7 19:28:29 2001
    @@ -21,7 +21,7 @@
      * as a first class Component with the system.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Component.java,v 1.5 2001/03/01 22:42:45 burton Exp $
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
      */
     public interface Component {
     
    @@ -30,7 +30,7 @@
          * Called when this object is initialized.
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Component.java,v 1.5 2001/03/01 22:42:45 burton Exp $
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public void init() throws TalonException;
     
    @@ -39,7 +39,7 @@
          * Get the handle for this component.
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Component.java,v 1.5 2001/03/01 22:42:45 burton Exp $
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public ComponentHandle getComponentHandle();
     
    @@ -49,26 +49,37 @@
          * method is that within a given connected component system (even a P2P
          * system) each object can be refered to in a unique manner.
          *
    - * <p>
    - * The reference may be used to get refer to an object with a runtime
    + * <p> The reference may be used to get refer to an object with a runtime
          * system. Depending on its lifetime (demand, singleton, etc) it may have
          * been garbage collected so you can not be sure that it will still be
    - * around.
    + * around.
          *
          * <p>
    - * Should return a URI like talon://HOST/component/ID
    + * Should return a URI like talon://HOST/component/CLASSNAME/hashcode/HASHCODE
          *
          * @see Object#hashCode
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Component.java,v 1.5 2001/03/01 22:42:45 burton Exp $
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public URI getComponentReference();
     
         /**
    + * <p>
    + * Similer to getComponentReference but does not include any instance
    + * specific information. This is necessary if you want to request a object
    + * by its type information.
    + *
    + * @see #getComponentReference
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
    + */
    + public URI getTypeReference();
    +
    + /**
          * Set the handle for this component.
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Component.java,v 1.5 2001/03/01 22:42:45 burton Exp $
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public void setComponentHandle( ComponentHandle handle );
     
    @@ -78,7 +89,7 @@
          * switch logging implementations without needing a specific configuration.
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Component.java,v 1.5 2001/03/01 22:42:45 burton Exp $
    + * @version $Id: Component.java,v 1.6 2001/03/08 03:28:29 burton Exp $
          */
         public Logger getLogger();
         



    This archive was generated by hypermail 2b30 : Wed Mar 07 2001 - 19:28:31 PST