summaryrefslogtreecommitdiffstats
path: root/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany')
-rw-r--r--java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Alpha.java26
-rw-r--r--java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/AlphaImpl.java96
-rw-r--r--java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Beta.java27
-rw-r--r--java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/BetaImpl.java46
-rw-r--r--java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Gamma.java34
-rw-r--r--java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/GammaImpl.java49
6 files changed, 0 insertions, 278 deletions
diff --git a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Alpha.java b/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Alpha.java
deleted file mode 100644
index 6ecf3d662e..0000000000
--- a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Alpha.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.sca.itest.callablerefwsreturn;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Alpha {
- boolean run();
-}
diff --git a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/AlphaImpl.java b/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/AlphaImpl.java
deleted file mode 100644
index 64a11f0bf3..0000000000
--- a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/AlphaImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.sca.itest.callablerefwsreturn;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.Conversation;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(Alpha.class)
-@Scope("COMPOSITE")
-public class AlphaImpl implements Alpha {
- @Reference
- public Beta beta;
-
- @Context
- protected ComponentContext componentContext;
-
- Object conversationId0 = null;
-
- public boolean run() {
- CallableReference<Gamma> gammaRef = null;
- try {
- Object conversationId1 = null;
- Object conversationId2 = null;
-
- // it is expected that this call returns a reference to Gamma that
- // reuses the established Conversation
- gammaRef = beta.getRef();
-
- // no Conversation exists
- Conversation con = gammaRef.getConversation();
- if (con == null) {
- System.out.println("Alpha1: Conversation to gamma is null");
- } else {
- System.out
- .println("Alpha1: Conversation to gamma exists. conversationId="
- + con.getConversationID());
- conversationId1 = con.getConversationID();
- }
-
- // this call should reuse a Conversation, but as none exists it
- // creates a new conversation
- gammaRef.getService().doSomething();
- gammaRef.getService().doSomething();
- gammaRef.getService().doSomething();
-
- con = gammaRef.getConversation();
- if (con == null) {
- System.out.println("Alpha2: Conversation to gamma is null");
- } else {
- System.out
- .println("Alpha2: Conversation to gamma exists. conversationId="
- + con.getConversationID());
- conversationId2 = con.getConversationID();
- }
-
- boolean testPassed = conversationId1.equals(conversationId2);
-
- if (conversationId0 == null){
- conversationId0 = conversationId1;
- return testPassed;
- } else {
- return testPassed && (!conversationId0.equals(conversationId1));
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- } finally {
- if (gammaRef != null) {
- gammaRef.getService().stop();
- }
- }
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Beta.java b/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Beta.java
deleted file mode 100644
index 9861b0a85e..0000000000
--- a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Beta.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.sca.itest.callablerefwsreturn;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Beta {
- CallableReference<Gamma> getRef();
-}
diff --git a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/BetaImpl.java b/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/BetaImpl.java
deleted file mode 100644
index c870cd87fe..0000000000
--- a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/BetaImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.sca.itest.callablerefwsreturn;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(Beta.class)
-@Scope("COMPOSITE")
-public class BetaImpl implements Beta {
- @Context
- protected ComponentContext componentContext;
-
- @Reference
- public Gamma gamma;
-
- public CallableReference<Gamma> getRef() {
- ServiceReference<Gamma> gammaRef = componentContext
- .getServiceReference(Gamma.class, "gamma");
- Gamma g = gammaRef.getService();
- g.start();
- return gammaRef;
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Gamma.java b/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Gamma.java
deleted file mode 100644
index ee9d0f0b26..0000000000
--- a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/Gamma.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.sca.itest.callablerefwsreturn;
-
-import org.oasisopen.sca.annotation.Conversational;
-import org.oasisopen.sca.annotation.EndsConversation;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-@Conversational
-public interface Gamma {
- int start();
-
- void doSomething();
-
- @EndsConversation
- void stop();
-}
diff --git a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/GammaImpl.java b/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/GammaImpl.java
deleted file mode 100644
index 9a4f31d79d..0000000000
--- a/java/sca-contrib/itest/callablereferences-ws/src/main/java/org/apache/tuscany/sca/itest/callablerefwsreturn/GammaImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.sca.itest.callablerefwsreturn;
-
-import org.oasisopen.sca.annotation.ConversationID;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(Gamma.class)
-@Scope("CONVERSATION")
-public class GammaImpl implements Gamma {
- @ConversationID
- protected String conversationId;
-
- public GammaImpl() {
- System.out.println("GammaImpl:GammaImpl(), conversationId="
- + conversationId);
- }
-
- public int start() {
- System.out.println("Gamma:start(), conversationId=" + conversationId);
- return 1;
- }
-
- public void doSomething() {
- System.out.println("Gamma:doSomething(), conversationId="
- + conversationId);
- }
-
- public void stop() {
- System.out.println("Gamma:stop(), conversationId=" + conversationId);
- }
-}