You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/02/02 03:43:26 UTC

svn commit: r502452 - in /incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca: AbstractReference.java CallbackReference.java ServiceReference.java

Author: jboynes
Date: Thu Feb  1 18:43:25 2007
New Revision: 502452

URL: http://svn.apache.org/viewvc?view=rev&rev=502452
Log:
extract common super-interface for Service and Callback references

Added:
    incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java   (with props)
Modified:
    incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallbackReference.java
    incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java

Added: incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java?view=auto&rev=502452
==============================================================================
--- incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java (added)
+++ incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java Thu Feb  1 18:43:25 2007
@@ -0,0 +1,37 @@
+package org.osoa.sca;
+
+/**
+ * Common superclass for references that can be passed between components.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface AbstractReference<B> {
+    /**
+     * Returns the Java class for the business interface associated with this reference.
+     *
+     * @return the Class for the business interface associated with this reference
+     */
+    Class<B> getBusinessInterface();
+
+    /**
+     * Returns true if this reference is conversational.
+     *
+     * @return true if this reference is conversational
+     */
+    boolean isConversational();
+
+    /**
+     * Returns the conversation associated with this reference.
+     * Returns null if no conversation is currently active.
+     *
+     * @return the conversation associated with this reference; may be null
+     */
+    Conversation getConversation();
+
+    /**
+     * Returns the callback ID.
+     *
+     * @return the callback ID
+     */
+    Object getCallbackID();
+}

Propchange: incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/AbstractReference.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallbackReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallbackReference.java?view=diff&rev=502452&r1=502451&r2=502452
==============================================================================
--- incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallbackReference.java (original)
+++ incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallbackReference.java Thu Feb  1 18:43:25 2007
@@ -1,27 +1,15 @@
 package org.osoa.sca;
 
 /**
+ * A CallbackReference represents a server's perspective of a callback to an initiating component.
+ *
  * @version $Rev$ $Date$
  */
-public interface CallbackReference<CB> {
+public interface CallbackReference<CB> extends AbstractReference<CB> {
     /**
      * Return a proxy that can be used to invoke the callback instance associated with this reference.
      *
      * @return a proxy that can be used to invoke the callback
      */
     CB getCallback();
-
-    /**
-     * Returns the conversation associated with this callback.
-     *
-     * @return the conversation associated with this callback
-     */
-    Conversation getConversation();
-
-    /**
-     * Returns the callback ID.
-     *
-     * @return the callback ID
-     */
-    Object getCallbackID();
 }

Modified: incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java?view=diff&rev=502452&r1=502451&r2=502452
==============================================================================
--- incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java (original)
+++ incubator/tuscany/java/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java Thu Feb  1 18:43:25 2007
@@ -24,7 +24,7 @@
  *
  * @version $Rev$ $Date$
  */
-public interface ServiceReference<B> {
+public interface ServiceReference<B> extends AbstractReference<B> {
     /**
      * Returns a type-safe reference to the target of this reference.
      * The instance returned is guaranteed to implement the business interface for this reference
@@ -35,28 +35,6 @@
     B getService();
 
     /**
-     * Returns the Java class for the business interface associated with this reference.
-     *
-     * @return the Class for the business interface associated with this reference
-     */
-    Class<B> getBusinessInterface();
-
-    /**
-     * Returns true if this reference is conversational.
-     *
-     * @return true if this reference is conversational
-     */
-    boolean isConversational();
-
-    /**
-     * Returns the current conversation associated with this reference.
-     *
-     * @return the current conversation associated with this reference; null if there is no active conversation
-     * @throws IllegalStateException if this reference is not conversational
-     */
-    Conversation getConversation() throws IllegalStateException;
-
-    /**
      * Returns the id supplied by the user that will be associated with conversations initiated through this reference.
      *
      * @return the id to associated with any conversation initiated through this reference
@@ -71,13 +49,6 @@
      * @throws IllegalStateException if a conversation is currently associated with this reference
      */
     void setConversationID(Object conversationId) throws IllegalStateException;
-
-    /**
-     * Returns the callback ID.
-     *
-     * @return the callback ID
-     */
-    Object getCallbackID();
 
     /**
      * Sets the callback ID.



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org