diff options
Diffstat (limited to 'java/sca/modules/core-spi')
4 files changed, 103 insertions, 4 deletions
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java index 942f3bca78..a805985a11 100644 --- a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java +++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java @@ -21,6 +21,7 @@ package org.apache.tuscany.sca.context; import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.runtime.EndpointRegistry; @@ -66,6 +67,12 @@ public abstract class CompositeContext { * @param runtimeComponent */ public abstract void bindComponent(RuntimeComponent runtimeComponent); + + /** + * + * @param endpointReference + */ + public abstract void bindEndpointReference(EndpointReference endpointReference); /** * Get the ExtensionPointRegistry for this node diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/CompositeActivator.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/CompositeActivator.java index 3631684a54..f4e18f60cc 100644 --- a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/CompositeActivator.java +++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/CompositeActivator.java @@ -31,30 +31,34 @@ import org.apache.tuscany.sca.context.CompositeContext; public interface CompositeActivator { /** * Activate a composite + * @param compositeContext The context of the Node * @param composite */ - void activate(Composite composite) throws ActivationException; + void activate(CompositeContext compositeContext, Composite composite) throws ActivationException; /** * Activate a component reference + * @param compositeContext The context of the Node * @param component * @param ref */ - void start(RuntimeComponent component, RuntimeComponentReference ref); + void start(CompositeContext compositeContext, RuntimeComponent component, RuntimeComponentReference ref); /** * Activate a component reference + * @param compositeContext The context of the Node * @param component * @param ref */ - void activate(RuntimeComponent component, RuntimeComponentReference ref); + void activate(CompositeContext compositeContext, RuntimeComponent component, RuntimeComponentReference ref); /** * Activate a component reference + * @param compositeContext The context of the Node * @param component * @param ref */ - void activate(RuntimeComponent component, RuntimeComponentService service); + void activate(CompositeContext compositeContext, RuntimeComponent component, RuntimeComponentService service); /** * De-activate a component reference diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryFactory.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryFactory.java new file mode 100644 index 0000000000..7b71406ac6 --- /dev/null +++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryFactory.java @@ -0,0 +1,46 @@ +/* + * 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.runtime; + +import java.util.Collection; +import java.util.List; + +/** + * + */ +public interface DomainRegistryFactory { + /** + * Get the EndpointRegistry for the given registry URI and domain URI + * @param endpointRegistryURI A URI can be used to connect to the registry, such as vm://localhost + * or multicast://200.0.100.200:50000/... + * @param domainURI The domain URI + * @return + */ + EndpointRegistry getEndpointRegistry(String endpointRegistryURI, String domainURI); + + /** + * Return all active endpoint registries + * @return + */ + Collection<EndpointRegistry> getEndpointRegistries(); + void addListener(EndpointListener listener); + void removeListener(EndpointListener listener); + List<EndpointListener> getListeners(); +} diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReferenceBinder.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReferenceBinder.java new file mode 100644 index 0000000000..78a0e19f10 --- /dev/null +++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReferenceBinder.java @@ -0,0 +1,42 @@ +/* + * 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.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; + +/** + * A utility responsible for resolving the endpoint reference against a matching endpoint published + * to the EndpointRegistry + */ +public interface EndpointReferenceBinder { + /** + * @param endpointRegistry + * @param endpointReference + * @return + */ + boolean bind(EndpointRegistry endpointRegistry, EndpointReference endpointReference); + /** + * + * @param endpointRegistry + * @param endpointReference + * @return + */ + boolean isOutOfDate(EndpointRegistry endpointRegistry, EndpointReference endpointReference); +} |