You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/04/04 05:19:09 UTC

svn commit: r525379 - in /incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl: Interface.java InvalidInterfaceException.java Operation.java impl/InterfaceImpl.java impl/OperationImpl.java

Author: rfeng
Date: Tue Apr  3 20:19:08 2007
New Revision: 525379

URL: http://svn.apache.org/viewvc?view=rev&rev=525379
Log:
Add isConversational to the Interface

Added:
    incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java   (with props)
Modified:
    incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Interface.java
    incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Operation.java
    incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/InterfaceImpl.java
    incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/OperationImpl.java

Modified: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Interface.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Interface.java?view=diff&rev=525379&r1=525378&r2=525379
==============================================================================
--- incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Interface.java (original)
+++ incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Interface.java Tue Apr  3 20:19:08 2007
@@ -40,6 +40,18 @@
      * @param remotable indicates whether the interface is remotable or local
      */
     void setRemotable(boolean remotable);
+    
+    /**
+     * Test if the interface is conversational
+     * @return
+     */
+    boolean isConversational();
+    
+    /**
+     * Set whether the interface is conversational 
+     * @param conversational
+     */
+    void setConversational(boolean conversational);
 
     /**
      * Returns the operations defined on this interface.

Added: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java?view=auto&rev=525379
==============================================================================
--- incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java (added)
+++ incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java Tue Apr  3 20:19:08 2007
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.idl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class InvalidInterfaceException extends Exception {
+
+    public InvalidInterfaceException() {
+    }
+
+    public InvalidInterfaceException(String message) {
+        super(message);
+    }
+
+    public InvalidInterfaceException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvalidInterfaceException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/InvalidInterfaceException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Operation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Operation.java?view=diff&rev=525379&r1=525378&r2=525379
==============================================================================
--- incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Operation.java (original)
+++ incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/Operation.java Tue Apr  3 20:19:08 2007
@@ -24,6 +24,9 @@
  * Represents an operation on a service interface.
  */
 public interface Operation {
+    enum ConversationSequence {
+        NO_CONVERSATION, CONVERSATION_CONTINUE, CONVERSATION_END
+    };
 
     /**
      * Returns the name of the operation.
@@ -54,8 +57,8 @@
     void setUnresolved(boolean unresolved);
 
     /**
-     * Get the data type that represents the input of this operation. The logic type is 
-     * a list of data types and each element represents a parameter
+     * Get the data type that represents the input of this operation. The logic
+     * type is a list of data types and each element represents a parameter
      * 
      * @return the inputType
      */
@@ -70,8 +73,14 @@
 
     /**
      * Get a list of data types to represent the faults/exceptions
+     * 
      * @return the faultTypes
      */
     List<DataType> getFaultTypes();
+    
+    Interface getInterface();
+    void setInterface(Interface interfaze);
+    ConversationSequence getConversationSequence();
+    void setConversationSequence(ConversationSequence sequence);
 
 }

Modified: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/InterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/InterfaceImpl.java?view=diff&rev=525379&r1=525378&r2=525379
==============================================================================
--- incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/InterfaceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/InterfaceImpl.java Tue Apr  3 20:19:08 2007
@@ -32,6 +32,7 @@
 public class InterfaceImpl implements Interface {
 
     private boolean remotable;
+    private boolean conversational;
     private List<Operation> operations = new ArrayList<Operation>();
     private boolean unresolved;
 
@@ -53,6 +54,20 @@
 
     public void setUnresolved(boolean undefined) {
         this.unresolved = undefined;
+    }
+
+    /**
+     * @return the conversational
+     */
+    public boolean isConversational() {
+        return conversational;
+    }
+
+    /**
+     * @param conversational the conversational to set
+     */
+    public void setConversational(boolean conversational) {
+        this.conversational = conversational;
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/OperationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/OperationImpl.java?view=diff&rev=525379&r1=525378&r2=525379
==============================================================================
--- incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/OperationImpl.java (original)
+++ incubator/tuscany/java/sca/modules/idl/src/main/java/org/apache/tuscany/idl/impl/OperationImpl.java Tue Apr  3 20:19:08 2007
@@ -21,6 +21,7 @@
 import java.util.List;
 
 import org.apache.tuscany.idl.DataType;
+import org.apache.tuscany.idl.Interface;
 import org.apache.tuscany.idl.Operation;
 
 /**
@@ -35,6 +36,8 @@
     private DataType outputType;
     private DataType<List<DataType>> inputType;
     private List<DataType> faultTypes;    
+    private Interface interfaze;
+    private ConversationSequence conversationSequence;
 
     public String getName() {
         return name;
@@ -92,6 +95,34 @@
      */
     public void setOutputType(DataType outputType) {
         this.outputType = outputType;
+    }
+
+    /**
+     * @return the interfaze
+     */
+    public Interface getInterface() {
+        return interfaze;
+    }
+
+    /**
+     * @param interfaze the interfaze to set
+     */
+    public void setInterface(Interface interfaze) {
+        this.interfaze = interfaze;
+    }
+
+    /**
+     * @return the conversationSequence
+     */
+    public ConversationSequence getConversationSequence() {
+        return conversationSequence;
+    }
+
+    /**
+     * @param conversationSequence the conversationSequence to set
+     */
+    public void setConversationSequence(ConversationSequence conversationSequence) {
+        this.conversationSequence = conversationSequence;
     }
 
 }



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


Re: Representing conversational interfaces, was: svn commit: r525379

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
>
> I came to this from the Java C&I spec which defines some conversation 
> characteristics. Is @Conversational used to define the intent?

Yes, that's my understanding.

> If so, it's a bit wierd that the Java C&I steps into the intent area 
> only with this annotation.

The Java C&I spec defines annotations for other intents and policySets, 
see chapter 2 of the spec :)

>
> Thanks,
> Raymond
>
> ----- Original Message ----- From: "Jean-Sebastien Delfino" 
> <js...@apache.org>
> To: <tu...@ws.apache.org>
> Sent: Wednesday, April 04, 2007 7:58 AM
> Subject: Representing conversational interfaces, was: svn commit: r525379
>
>
>> [snip]
>> rfeng@apache.org wrote:
>>> Author: rfeng
>>> Date: Tue Apr  3 20:19:08 2007
>>> New Revision: 525379
>>>
>>> URL: http://svn.apache.org/viewvc?view=rev&rev=525379
>>> Log:
>>> Add isConversational to the Interface
>>>
>>>
>>
>> I think it's ok for now if you want to have this conversational 
>> boolean flag on Interface, but according to the SCA spec, 
>> "conversational" is really a policy intent which I believe should be 
>> applied to the whole contract (including the interface and the 
>> corresponding callback interface, if any). I had put an 
>> isConversational flag on the first of Interface but had removed later 
>> it for this reason :) It's probably a good idea to add a //TODO to 
>> the code and/or a JIRA issue to mark that we'll need to make this 
>> change later.
>>
>> Here's the relevant text from the SCA assembly spec:
>> This specification requires interfaces to be marked as conversational 
>> by means of a policy intent with the name "conversational".   The 
>> form of the marking of this intent depends on the interface type.  
>> Note that it is also possible for a service or a reference to set the 
>> conversational intent when using an interface which is not marked 
>> with the conversational intent.  This can be useful when reusing an 
>> existing interface definition that does not contain SCA information.
>>
>> -- 
>> Jean-Sebastien
>>

-- 
Jean-Sebastien


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


Re: Representing conversational interfaces, was: svn commit: r525379

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I came to this from the Java C&I spec which defines some conversation 
characteristics. Is @Conversational used to define the intent? If so, it's a 
bit wierd that the Java C&I steps into the intent area only with this 
annotation.

Thanks,
Raymond

----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Wednesday, April 04, 2007 7:58 AM
Subject: Representing conversational interfaces, was: svn commit: r525379


> [snip]
> rfeng@apache.org wrote:
>> Author: rfeng
>> Date: Tue Apr  3 20:19:08 2007
>> New Revision: 525379
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=525379
>> Log:
>> Add isConversational to the Interface
>>
>>
>
> I think it's ok for now if you want to have this conversational boolean 
> flag on Interface, but according to the SCA spec, "conversational" is 
> really a policy intent which I believe should be applied to the whole 
> contract (including the interface and the corresponding callback 
> interface, if any). I had put an isConversational flag on the first of 
> Interface but had removed later it for this reason :) It's probably a good 
> idea to add a //TODO to the code and/or a JIRA issue to mark that we'll 
> need to make this change later.
>
> Here's the relevant text from the SCA assembly spec:
> This specification requires interfaces to be marked as conversational by 
> means of a policy intent with the name "conversational".   The form of the 
> marking of this intent depends on the interface type.  Note that it is 
> also possible for a service or a reference to set the conversational 
> intent when using an interface which is not marked with the conversational 
> intent.  This can be useful when reusing an existing interface definition 
> that does not contain SCA information.
>
> -- 
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


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


Representing conversational interfaces, was: svn commit: r525379

Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
rfeng@apache.org wrote:
> Author: rfeng
> Date: Tue Apr  3 20:19:08 2007
> New Revision: 525379
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=525379
> Log:
> Add isConversational to the Interface
>
>   

I think it's ok for now if you want to have this conversational boolean 
flag on Interface, but according to the SCA spec, "conversational" is 
really a policy intent which I believe should be applied to the whole 
contract (including the interface and the corresponding callback 
interface, if any). I had put an isConversational flag on the first of 
Interface but had removed later it for this reason :) It's probably a 
good idea to add a //TODO to the code and/or a JIRA issue to mark that 
we'll need to make this change later.

Here's the relevant text from the SCA assembly spec:
This specification requires interfaces to be marked as conversational by 
means of a policy intent with the name "conversational".   The form of 
the marking of this intent depends on the interface type.  Note that it 
is also possible for a service or a reference to set the conversational 
intent when using an interface which is not marked with the 
conversational intent.  This can be useful when reusing an existing 
interface definition that does not contain SCA information.

-- 
Jean-Sebastien


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