diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:07:07 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:07:07 +0000 |
commit | 5559ef5edbf8d3616f7a4b497b2a459b0ee4082b (patch) | |
tree | 424dfa28917e6204d4fd24e4328d274f8d2d14d0 /branches/sca-java-1.0/samples/supplychain/src/main | |
parent | 3dd7e2c4da9c80b8182a2d04dc129a67aa7910df (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.0/samples/supplychain/src/main')
10 files changed, 0 insertions, 363 deletions
diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Customer.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Customer.java deleted file mode 100644 index 8088001898..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Customer.java +++ /dev/null @@ -1,33 +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 supplychain; - -import org.osoa.sca.annotations.OneWay; - -/** - * This is the business interface of the Customer service component. - */ -public interface Customer { - - public void purchaseGoods(); - - @OneWay - public void notifyShipment(String order); - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java deleted file mode 100644 index 7a1e8553ec..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java +++ /dev/null @@ -1,44 +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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Customer service component. - */ -public class CustomerComponentImpl implements Customer { - - private Retailer retailer; - - @Reference - public void setRetailer(Retailer retailer) { - this.retailer = retailer; - } - - public void purchaseGoods() { - retailer.submitOrder("Order"); - } - - public void notifyShipment(String order) { - System.out.print("Work thread " + Thread.currentThread() + " - "); - System.out.println(order); - } - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Retailer.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Retailer.java deleted file mode 100644 index 1add63fb4e..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Retailer.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 supplychain; - -/** - * This is the business interface of the Retailer service component. - */ -public interface Retailer { - - public void submitOrder(String order); - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java deleted file mode 100644 index f622052cf8..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java +++ /dev/null @@ -1,39 +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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Customer service component. - */ -public class RetailerComponentImpl implements Retailer { - - private Warehouse warehouse; - - @Reference - public void setWarehouse(Warehouse warehouse) { - this.warehouse = warehouse; - } - - public void submitOrder(String order) { - warehouse.fulfillOrder(order + ", submitted"); - } - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Shipper.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Shipper.java deleted file mode 100644 index d4d49a922b..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Shipper.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 supplychain; - -/** - * This is the business interface of the Shipper service component. - */ -public interface Shipper { - - public void processShipment(String order); - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java deleted file mode 100644 index 4ae52a12a2..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java +++ /dev/null @@ -1,39 +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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Warehouse service component. - */ -public class ShipperComponentImpl implements Shipper { - - private Customer customer; - - @Reference - public void setCustomer(Customer customer) { - this.customer = customer; - } - - public void processShipment(String order) { - customer.notifyShipment(order + ", shipped"); - } - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java deleted file mode 100644 index 7072f582d1..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java +++ /dev/null @@ -1,40 +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 supplychain; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate a Customer service component and invoke it. - */ -public class SupplyChainClient { - - public static final void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("supplychain.composite"); - Customer customer = scaDomain.getService(Customer.class, "CustomerComponent"); - - System.out.println("Main thread " + Thread.currentThread()); - customer.purchaseGoods(); - System.out.println("Main thread sleeping ..."); - Thread.sleep(1000); - - scaDomain.close(); - } -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Warehouse.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Warehouse.java deleted file mode 100644 index 0be499f569..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/Warehouse.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 supplychain; - -/** - * This is the business interface of the Warehouse service component. - */ -public interface Warehouse { - - public void fulfillOrder(String order); - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java b/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java deleted file mode 100644 index b5e256a1e0..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java +++ /dev/null @@ -1,39 +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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Warehouse service component. - */ -public class WarehouseComponentImpl implements Warehouse { - - private Shipper shipper; - - @Reference - public void setShipper(Shipper shipper) { - this.shipper = shipper; - } - - public void fulfillOrder(String order) { - shipper.processShipment(order + ", fulfilled"); - } - -} diff --git a/branches/sca-java-1.0/samples/supplychain/src/main/resources/supplychain.composite b/branches/sca-java-1.0/samples/supplychain/src/main/resources/supplychain.composite deleted file mode 100644 index 301efcaf1f..0000000000 --- a/branches/sca-java-1.0/samples/supplychain/src/main/resources/supplychain.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://supplychain" - xmlns:sp="http://supplychain" - name="supplychain"> - - <component name="CustomerComponent"> - <implementation.java class="supplychain.CustomerComponentImpl" /> - <reference name="retailer" target="RetailerComponent"/> - </component> - - <component name="RetailerComponent"> - <implementation.java class="supplychain.RetailerComponentImpl" /> - <reference name="warehouse" target="WarehouseComponent"/> - </component> - - <component name="WarehouseComponent"> - <implementation.java class="supplychain.WarehouseComponentImpl" /> - <reference name="shipper" target="ShipperComponent"/> - </component> - - <component name="ShipperComponent"> - <implementation.java class="supplychain.ShipperComponentImpl" /> - <reference name="customer" target="CustomerComponent"/> - </component> - -</composite> |