From 6fadbc9cd1fcf03d0b3630f772d91df149b70428 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:07:19 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835123 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/itest/callableref/AComponent.java | 35 --------- .../sca/itest/callableref/AComponentImpl.java | 88 ---------------------- .../tuscany/sca/itest/callableref/BComponent.java | 30 -------- .../sca/itest/callableref/BComponentImpl.java | 38 ---------- .../tuscany/sca/itest/callableref/CComponent.java | 27 ------- .../sca/itest/callableref/CComponentImpl.java | 30 -------- .../tuscany/sca/itest/callableref/DComponent.java | 28 ------- .../sca/itest/callableref/DComponentImpl.java | 52 ------------- 8 files changed, 328 deletions(-) delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java delete mode 100644 branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java (limited to 'branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org') diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java deleted file mode 100644 index fa63d975a6..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java +++ /dev/null @@ -1,35 +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.callableref; - -public interface AComponent { - String foo(); - - String fooB(); - String fooB1(); - - String fooC(); - String fooC1(); - - String fooD(); - - String fooBC(); - - DComponent getDReference(); -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java deleted file mode 100644 index af3e624dc7..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java +++ /dev/null @@ -1,88 +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.callableref; - -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -public class AComponentImpl implements AComponent { - - @Context - protected ComponentContext componentContext; - - @Reference(name = "bReference") - protected BComponent b; - - @Reference - protected CComponent cReference; - - @Reference - protected ServiceReference cServiceReference; - - @Reference(required=false) - protected DComponent dReference; - - protected DComponent dReference1; - - @Reference(name = "dReference1") - public void setDReference(DComponent dReference) { - this.dReference1 = dReference; - } - - public String foo() { - return "AComponent"; - } - - public String fooB() { - return b.foo(); - } - - public String fooB1() { - CallableReference bRef = componentContext.cast(b); - return bRef.getService().foo(); - } - - public String fooC() { - return cReference.foo(); - } - - public String fooC1() { - return cServiceReference.getService().foo(); - } - - public String fooBC() { - CallableReference cReference = componentContext.getServiceReference(CComponent.class, "cReference"); - return b.fooC(cReference); - } - - public String fooD() { - CallableReference aReference = componentContext.createSelfReference(AComponent.class); - return dReference1.foo(aReference); - } - - public DComponent getDReference() { - return dReference; - } - -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java deleted file mode 100644 index ade672b0ab..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java +++ /dev/null @@ -1,30 +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.callableref; - -import org.osoa.sca.CallableReference; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface BComponent { - - String foo(); - - String fooC(CallableReference cComponent); -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java deleted file mode 100644 index 518e77d3a8..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java +++ /dev/null @@ -1,38 +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.callableref; - -import org.osoa.sca.CallableReference; -import org.osoa.sca.annotations.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - public BComponentImpl() { - } - - public String foo() { - return "BComponent"; - } - - public String fooC(CallableReference cReference) { - return "B" + cReference.getService().foo(); - } - -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java deleted file mode 100644 index fdf80cc1c8..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.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.callableref; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CComponent { - - String foo(); -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java deleted file mode 100644 index cc8ec8f000..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java +++ /dev/null @@ -1,30 +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.callableref; - -import org.osoa.sca.annotations.Service; - -@Service(CComponent.class) -public class CComponentImpl implements CComponent { - - public String foo() { - return "CComponent"; - } - -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java deleted file mode 100644 index 3b25d351ae..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java +++ /dev/null @@ -1,28 +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.callableref; - -import org.osoa.sca.CallableReference; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface DComponent { - - String foo(CallableReference aReference); -} diff --git a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java b/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java deleted file mode 100644 index 1ab1973476..0000000000 --- a/branches/sca-java-1.0.1/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java +++ /dev/null @@ -1,52 +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.callableref; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import org.osoa.sca.CallableReference; -import org.osoa.sca.RequestContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; - -@Service(DComponent.class) -public class DComponentImpl implements DComponent { - - @Context - protected RequestContext requestContext; - - public String foo(CallableReference aReference) { - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(aReference); - ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); - Object obj = ois.readObject(); - aReference = (CallableReference) obj; - } catch (Exception e) { - e.printStackTrace(); - } - System.out.println("Invoking service: " + requestContext.getServiceName()); - return "D" + aReference.getService().foo(); - } - -} -- cgit v1.2.3