diff options
author | rsivaram <rsivaram@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-21 10:26:17 +0000 |
---|---|---|
committer | rsivaram <rsivaram@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-21 10:26:17 +0000 |
commit | d02579ef284a315b4c0ba0339497707d4e4798d3 (patch) | |
tree | 3120c989cc89103fcbc062c02007343e8e5b5424 /sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca | |
parent | e753f271ccf0ff4617725130b82dd21ae721b3d2 (diff) |
Event prototype: initial model changes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@706572 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca')
10 files changed, 372 insertions, 0 deletions
diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentConsumer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentConsumer.java new file mode 100644 index 0000000000..b693b69ecb --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentConsumer.java @@ -0,0 +1,32 @@ +/* + * 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.assembly; + + +/** + * Represents a component consumer. + * + * @version $$ + */ +public interface ComponentConsumer extends Consumer { + + Consumer getConsumer(); + void setConsumer(Consumer consumer); + +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentProducer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentProducer.java new file mode 100644 index 0000000000..d8fab68aa5 --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentProducer.java @@ -0,0 +1,33 @@ +/* + * 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.assembly; + + + +/** + * Represents a component producer. + * + * @version $$ + */ +public interface ComponentProducer extends Producer { + + Producer getProducer(); + void setProducer(Producer producer); + +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/CompositeConsumer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/CompositeConsumer.java new file mode 100644 index 0000000000..205cc32d7f --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/CompositeConsumer.java @@ -0,0 +1,47 @@ +/* + * 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.assembly; + + +/** + * Represents a composite consumer. + * + * @version $$ + */ +public interface CompositeConsumer extends Consumer { + + + + /** + * Returns the promoted component. + * + * @return the promoted component. + */ + Component getPromotedComponent(); + + /** + * Sets the promoted component + * + * @param promotedComponent the promoted component. + */ + void setPromotedComponent(Component promotedComponent); + + ComponentConsumer getPromotedConsumer(); + void setPromotedConsumer(ComponentConsumer consumer); +}
\ No newline at end of file diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/CompositeProducer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/CompositeProducer.java new file mode 100644 index 0000000000..563497a591 --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/CompositeProducer.java @@ -0,0 +1,47 @@ +/* + * 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.assembly; + + +/** + * Represents a composite producer. + * + * @version $$ + */ +public interface CompositeProducer extends Producer { + + + + /** + * Returns the promoted component. + * + * @return the promoted component. + */ + Component getPromotedComponent(); + + /** + * Sets the promoted component + * + * @param promotedComponent the promoted component. + */ + void setPromotedComponent(Component promotedComponent); + + ComponentProducer getPromotedProducer(); + void setPromotedProducer(ComponentProducer producer); +}
\ No newline at end of file diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java new file mode 100644 index 0000000000..1120e7ce87 --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java @@ -0,0 +1,38 @@ +/* + * 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.assembly; + +import java.util.List; + + +/** + * Represents a consumer. + * + * @version $$ + */ +public interface Consumer extends EventTarget, Contract { + + + List<EventSource> getSources(); + + String getOperationName(); + + void setOperationName(String operationName); + +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventBinding.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventBinding.java new file mode 100644 index 0000000000..1c586889be --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventBinding.java @@ -0,0 +1,31 @@ +/* + * 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.assembly; + +/** + * Represents an Event binding. + * + * @version $$ + */ +public interface EventBinding extends Binding { + + Binding getBaseBinding(); + + void setBaseBinding(Binding baseBinding); +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventBindingFactory.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventBindingFactory.java new file mode 100644 index 0000000000..f82fb02b1d --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventBindingFactory.java @@ -0,0 +1,36 @@ +/* + * 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.assembly; + + +/** + * A factory for the Event binding model + * + * @version $$ + */ +public interface EventBindingFactory { + + /** + * Create a new Event binding. + * + * @return a new Event binding + */ + EventBinding createEventBinding(); + +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java new file mode 100644 index 0000000000..34e2644ed2 --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java @@ -0,0 +1,37 @@ +/* + * 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.assembly; + +public interface EventSource extends Base, Extensible, Cloneable { + + /** + * Returns the name of the source. + * + * @return the name of the source + */ + String getName(); + + /** + * Sets the name of the source. + * + * @param name the name of the source + */ + void setName(String name); + +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java new file mode 100644 index 0000000000..6334013c2b --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java @@ -0,0 +1,37 @@ +/* + * 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.assembly; + +public interface EventTarget extends Base, Extensible, Cloneable { + + /** + * Returns the name of the target. + * + * @return the name of the target + */ + String getName(); + + /** + * Sets the name of the target. + * + * @param name the name of the target + */ + void setName(String name); + +} diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Producer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Producer.java new file mode 100644 index 0000000000..5059a33ee0 --- /dev/null +++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Producer.java @@ -0,0 +1,34 @@ +/* + * 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.assembly; + +import java.util.List; + + +/** + * Represents a producer + * + * @version $$ + */ +public interface Producer extends EventSource, Contract { + + List<EventTarget> getTargets(); + + +} |