tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r399161 [7/7] - in /incubator/tuscany/sandbox/jboynes/sca: ./ bindings/binding.jsonrpc/src/test/java/org/apache/tuscany/binding/jsonrpc/mocks/tuscany/ core/src/main/java/org/apache/tuscany/core/async/builder/ core/src/main/java/org/apache/t...
Date Wed, 03 May 2006 06:09:51 GMT
Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/Context.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/Context.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/Context.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/Context.java Tue May  2 23:09:37 2006
@@ -0,0 +1,71 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.context;
+
+import org.apache.tuscany.spi.Lifecycle;
+import org.apache.tuscany.spi.QualifiedName;
+import org.apache.tuscany.spi.event.EventPublisher;
+
+/**
+ * An entity that provides an execution context for a runtime artifact or artifacts. A <code>Context</code> may
+ * be a composite, managing child contexts or it may be an atomic, i.e. leaf, context.
+ *
+ * @version $Rev: 396520 $ $Date: 2006-04-24 12:38:07 +0100 (Mon, 24 Apr 2006) $
+ */
+public interface Context extends EventPublisher, Lifecycle {
+    /**
+     * Returns the name of the Context.
+     *
+     * @return the name of the Context
+     */
+    String getName();
+
+    /**
+     * Sets the name of the Context.
+     *
+     * @param name the name of the Context
+     */
+    void setName(String name);
+
+    /**
+     * Returns the instance associated with the requested name, which may be in a atomic or composite form. Atomic (i.e.
+     * leaf) contexts will return an instance associated with the service name part of the compound name, which may be
+     * null.
+     * <p/>
+     * Composite contexts will return an instance (likely a proxy) of a contained entry point context. In this case, the
+     * port name on the qualified name will correspond to the composite context name and the part name will be used to
+     * retrieve the contained entry point context. The latter may be null. If the contained context is not an entry
+     * point context, an exception will be thrown.
+     *
+     * @param qName a qualified name of the requested instance
+     * @return the implementation instance or a proxy to it
+     * @throws TargetException if an error occurs retrieving the instance or the requested component is not an entry
+     *                         point.
+     * @see CompositeContext
+     */
+    public Object getInstance(QualifiedName qName) throws TargetException;
+
+    /**
+     * Returns the parent context, or null if the context does not have one
+     */
+    CompositeContext getParent();
+
+    /**
+     * Sets the parent context
+     */
+    void setParent(CompositeContext parent);
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/Context.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/Context.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/ContextRuntimeException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/ContextRuntimeException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/ContextRuntimeException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/ContextRuntimeException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,41 @@
+/**
+ * 
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ * 
+ * Licensed 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.spi.context;
+
+import org.apache.tuscany.spi.CoreRuntimeException;
+
+/**
+ * An unchecked exception encountered by an {@link Context}
+ *
+ * @version $Rev: 392190 $ $Date: 2006-04-06 22:37:58 -0700 (Thu, 06 Apr 2006) $
+ */
+public class ContextRuntimeException extends CoreRuntimeException {
+
+    public ContextRuntimeException() {
+        super();
+    }
+
+    public ContextRuntimeException(String message) {
+        super(message);
+    }
+
+    public ContextRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ContextRuntimeException(Throwable cause) {
+        super(cause);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/ContextRuntimeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/ContextRuntimeException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/TargetException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/TargetException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/TargetException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/TargetException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,44 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.context;
+
+import org.apache.tuscany.spi.CoreRuntimeException;
+
+/**
+ * Denotes an error while performing an operation on a target component implementation instance or proxy
+ *
+ * @version $Rev: 368822 $ $Date: 2006-01-13 10:54:38 -0800 (Fri, 13 Jan 2006) $
+ */
+public class TargetException extends CoreRuntimeException {
+
+    public TargetException() {
+        super();
+    }
+
+    public TargetException(String message) {
+        super(message);
+    }
+
+    public TargetException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public TargetException(Throwable cause) {
+        super(cause);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/TargetException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/context/TargetException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/Event.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/Event.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/Event.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/Event.java Tue May  2 23:09:37 2006
@@ -0,0 +1,28 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.spi.event;
+
+/**
+ * Represents an event that is propagated in the runtime
+ *
+ * @version $$Rev$$ $$Date$$
+ */
+public interface Event {
+
+    /**
+     * Returns the source of the event
+     */
+    public Object getSource();
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/Event.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/Event.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventFilter.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventFilter.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventFilter.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventFilter.java Tue May  2 23:09:37 2006
@@ -0,0 +1,28 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.spi.event;
+
+/**
+ * Evaluates whether a {@link RuntimeEventListener} is applicable to a given runtime event
+ *
+ * @version $$Rev$$ $$Date$$
+ */
+public interface EventFilter {
+
+    /**
+     * Performs the actual evaluation on an event
+     */
+    public boolean match(Event event);
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventFilter.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventPublisher.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventPublisher.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventPublisher.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventPublisher.java Tue May  2 23:09:37 2006
@@ -0,0 +1,42 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.spi.event;
+
+/**
+ * Publishes events in the runtime
+ *
+ * @version $$Rev$$ $$Date$$
+ */
+public interface EventPublisher {
+
+    public void publish(Event object);
+
+    /**
+     * Registers a listener to receive notifications for the context
+     */
+    public void addListener(RuntimeEventListener listener);
+
+    /**
+     * Registers a listener to receive notifications for the context
+     */
+    public void addListener(EventFilter filter, RuntimeEventListener listener);
+
+
+    /**
+     * Removes a previously registered listener
+     */
+    public void removeListener(RuntimeEventListener listener);
+
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventPublisher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/EventPublisher.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/RuntimeEventListener.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/RuntimeEventListener.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/RuntimeEventListener.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/RuntimeEventListener.java Tue May  2 23:09:37 2006
@@ -0,0 +1,29 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.event;
+
+import java.util.EventListener;
+
+/**
+ * Listeners observe events fired in the SCA runtime.
+ *
+ * @version $Rev: 393369 $ $Date: 2006-04-11 19:36:42 -0700 (Tue, 11 Apr 2006) $
+ */
+public interface RuntimeEventListener extends EventListener {
+
+    public void onEvent(Event event);
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/RuntimeEventListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/event/RuntimeEventListener.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderContext.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderContext.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderContext.java Tue May  2 23:09:37 2006
@@ -0,0 +1,45 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.loader;
+
+/**
+ * Context holder that can be used during the load process to store information
+ * that is not part of the logical model. This should be regarded as transient
+ * and references to this context should not be stored inside the model.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LoaderContext {
+    private final ClassLoader classLoader;
+
+    /**
+     * Constructor specifying the loader for application resources.
+     *
+     * @param classLoader the loader for application resources
+     */
+    public LoaderContext(ClassLoader classLoader) {
+        this.classLoader = classLoader;
+    }
+
+    /**
+     * Returns a class loader that can be used to load application resources.
+     * @return a class loader that can be used to load application resources
+     */
+    public ClassLoader getClassLoader() {
+        return classLoader;
+    }
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.loader;
+
+import org.apache.tuscany.common.TuscanyException;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class LoaderException extends TuscanyException {
+    public LoaderException() {
+    }
+
+    public LoaderException(String message) {
+        super(message);
+    }
+
+    public LoaderException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public LoaderException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/LoaderException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXElementLoader.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXElementLoader.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXElementLoader.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXElementLoader.java Tue May  2 23:09:37 2006
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.loader;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.tuscany.model.ModelObject;
+
+/**
+ * A loader that creates a model object from a StAX input stream.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface StAXElementLoader<T extends ModelObject> {
+    /**
+     * Build the model object for an element in an XML stream.
+     * When this method returns the stream will be positioned on the corresponding END_ELEMENT.
+     *
+     * @param reader the XML stream reader positioned on the applicable START_ELEMENT
+     * @param loaderContext the context for the load operation
+     * @return the model object for that element
+     */
+    T load(XMLStreamReader reader, LoaderContext loaderContext) throws XMLStreamException, LoaderException;
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXElementLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXElementLoader.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXLoaderRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXLoaderRegistry.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXLoaderRegistry.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXLoaderRegistry.java Tue May  2 23:09:37 2006
@@ -0,0 +1,71 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.loader;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.model.ModelObject;
+
+/**
+ * Registry for XML loaders that can parse a StAX input stream and return model objects.
+ * <p/>
+ * Loaders will typically be contributed to the system by any extension that needs to
+ * handle extension specific information contained in some XML configuration file.
+ * The loader can be contributed as a system component with an autowire reference
+ * to this registry which is used during initialization to actually register.
+ * </p>
+ * This registry can also be used to parse an input stream, dispatching to the
+ * appropriate loader for each element accepted. Loaders can call back to the
+ * registry to load sub-elements that they are not able to handle directly.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface StAXLoaderRegistry {
+    /**
+     * Register a loader. This operation will typically be called by a loader
+     * during its initialization.
+     *
+     * @param element the element that should be delegated to the contibuted loader
+     * @param loader  a loader that is being contributed to the system
+     */
+    <T extends ModelObject> void registerLoader(QName element, StAXElementLoader<T> loader);
+
+    /**
+     * Unregister a loader. This will typically be called by a loader as it is being destroyed.
+     *
+     * @param element the element that was being delegated to the contibuted loader
+     * @param loader  a loader that should no longer be used
+     */
+    <T extends ModelObject> void unregisterLoader(QName element, StAXElementLoader<T> loader);
+
+    /**
+     * Parse the supplied XML stream dispatching to the appropriate registered loader
+     * for each element encountered in the stream.
+     * <p/>
+     * This method must be called with the XML cursor positioned on a START_ELEMENT event.
+     * When this method returns, the stream will be positioned on the corresponding
+     * END_ELEMENT event.
+     *
+     * @param reader        the XML stream to parse
+     * @param loaderContext
+     * @return the model object obtained by parsing the current element on the stream
+     * @throws XMLStreamException if there was a problem reading the stream
+     */
+    ModelObject load(XMLStreamReader reader, LoaderContext loaderContext) throws XMLStreamException, LoaderException;
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXLoaderRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXLoaderRegistry.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXPropertyFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXPropertyFactory.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXPropertyFactory.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXPropertyFactory.java Tue May  2 23:09:37 2006
@@ -0,0 +1,41 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.loader;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.model.Property;
+import org.apache.tuscany.spi.ObjectFactory;
+
+/**
+ * A factory that will create an ObjectFactory for a property by parsing a StAX XMLStreamReader.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface StAXPropertyFactory<T> {
+    /**
+     * Return an ObjectFactory for instances of a property defined in an XML stream.
+     *
+     * @param reader the reader to use to access the XML stream
+     * @param property the Property definition that the resulting ObjectFactory must be able to assign to
+     * @return an ObjectFactory that can produce instances that can be assigned to the supplied Property
+     * @throws javax.xml.stream.XMLStreamException if there is a problem reading the stream
+     * @throws LoaderException if there is a problem creating the ObjectFactory
+     */
+    ObjectFactory<T> createObjectFactory(XMLStreamReader reader, Property property) throws XMLStreamException, LoaderException;
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXPropertyFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/loader/StAXPropertyFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Interceptor.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Interceptor.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Interceptor.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Interceptor.java Tue May  2 23:09:37 2006
@@ -0,0 +1,40 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Synchronous, around-style mediation associated with a client- or target- side wire.
+ * 
+ * @version $Rev: 394379 $ $Date: 2006-04-15 15:01:36 -0700 (Sat, 15 Apr 2006) $
+ */
+public interface Interceptor {
+    
+    /**
+     * Process a synchronous wire.
+     * 
+     * @param msg the request Message for the wire
+     * @return the response Message from the wire
+     */
+    Message invoke(Message msg);
+
+    /**
+     * Sets the next interceptor.
+     * 
+     * @param next
+     */
+    void setNext(Interceptor next);
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Interceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Interceptor.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/InvocationRuntimeException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/InvocationRuntimeException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/InvocationRuntimeException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/InvocationRuntimeException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,44 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+import org.osoa.sca.ServiceRuntimeException;
+
+/**
+ * Denotes a runtime exception thrown during an invocation over a wire
+ * 
+ * @version $Rev: 396284 $ $Date: 2006-04-23 16:27:42 +0100 (Sun, 23 Apr 2006) $
+ */
+public class InvocationRuntimeException extends ServiceRuntimeException {
+
+    public InvocationRuntimeException() {
+        super();
+    }
+
+    public InvocationRuntimeException(String message) {
+        super(message);
+    }
+
+    public InvocationRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvocationRuntimeException(Throwable cause) {
+        super(cause);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/InvocationRuntimeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/InvocationRuntimeException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Message.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Message.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Message.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Message.java Tue May  2 23:09:37 2006
@@ -0,0 +1,55 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Represents a request, response, or exception flowing through a wire
+ *
+ * @version $Rev $Date
+ */
+public interface Message {
+
+    /**
+     * Returns the body of the message, which will be the payload or parameters associated with the wire
+     */
+    Object getBody();
+
+    /**
+     * Sets the body of the message.
+     */
+    void setBody(Object body);
+
+    /**
+     * Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain
+     */
+    public void setTargetInvoker(TargetInvoker invoker);
+
+    /**
+     * Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain
+     */
+    public TargetInvoker getTargetInvoker();
+
+    /**
+     * Returns the callback channel
+     */
+    public MessageChannel getCallbackChannel();
+
+    /**
+     * 
+     */
+    public Message getRelatedCallbackMessage();
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Message.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/Message.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageChannel.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageChannel.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageChannel.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageChannel.java Tue May  2 23:09:37 2006
@@ -0,0 +1,30 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Represents a one-way pipeline through which messages are sent during an invocation over a wire
+ * 
+ */
+public interface MessageChannel {
+
+    /**
+     * Sends a message
+     */
+    void send(Message message);
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageChannel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageChannel.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageHandler.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageHandler.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageHandler.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageHandler.java Tue May  2 23:09:37 2006
@@ -0,0 +1,30 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Performs a uni-directional mediation on a message
+ *
+ */
+public interface MessageHandler {
+
+    /**
+     * Process a message.
+     */
+    boolean processMessage(Message message);
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/MessageHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/ProxyCreationException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/ProxyCreationException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/ProxyCreationException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/ProxyCreationException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,43 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Denotes an error creating a proxy representing for a wire
+ * 
+ * @version $Rev: 394379 $ $Date: 2006-04-15 15:01:36 -0700 (Sat, 15 Apr 2006) $
+ */
+public class ProxyCreationException extends WireException {
+
+    public ProxyCreationException() {
+        super();
+    }
+
+    public ProxyCreationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ProxyCreationException(String message) {
+        super(message);
+    }
+
+    public ProxyCreationException(Throwable cause) {
+        super(cause);
+    }
+
+}
+

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/ProxyCreationException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/ProxyCreationException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/SourceWireFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/SourceWireFactory.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/SourceWireFactory.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/SourceWireFactory.java Tue May  2 23:09:37 2006
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.spi.wire;
+
+/**
+ * Implementations are responsible for managing the source side of a wire.
+ *
+ * @version $$Rev$$ $$Date$$
+ */
+public interface SourceWireFactory<T> extends WireFactory<T> {
+
+    /**
+     * Returns the configuration information used to create the source-side of a wire, including invocation chains
+     */
+     public WireSourceConfiguration getConfiguration();
+
+    /**
+     * Sets the configuration information used to create the source-side of a wire, including invocation chains
+     */
+     public void setConfiguration(WireSourceConfiguration config);
+
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/SourceWireFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/SourceWireFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetInvoker.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetInvoker.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetInvoker.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetInvoker.java Tue May  2 23:09:37 2006
@@ -0,0 +1,47 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * Implementations are responsible for resolving a target and performing the actual invocation on it, for example, a
+ * service component implementation instance or an external service client.
+ * 
+ * @version $Rev: 395162 $ $Date: 2006-04-19 01:07:36 -0700 (Wed, 19 Apr 2006) $
+ */
+public interface TargetInvoker extends Interceptor, Cloneable{
+
+    /**
+     * Responsible for invoking an operation on a target with the given payload
+     * 
+     * @param payload the parameters of the target operation or null
+     * @throws InvocationTargetException if the target operation itself throws an exception. The root cause will be set
+     *         to that exception
+     */
+    public Object invokeTarget(Object payload) throws InvocationTargetException;
+
+    /**
+     * Determines whether the proxy can be cached on the client/source side
+     */
+    public boolean isCacheable();
+
+    /**
+     * Implementations must support deep cloning
+     */
+    public Object clone() throws CloneNotSupportedException;
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetWireFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetWireFactory.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetWireFactory.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetWireFactory.java Tue May  2 23:09:37 2006
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.spi.wire;
+
+/**
+ * Implementations are responsible for managing the target side of a wire
+ *
+ * @version $$Rev$$ $$Date$$
+ */
+public interface TargetWireFactory<T> extends WireFactory<T> {
+
+    /**
+     * Returns the configuration information used to create the target-side of a wire, including invocation chains
+     */
+    public WireTargetConfiguration getConfiguration();
+
+    /**
+     * Sets the configuration information used to create the target-side of a wire, including invocation chains
+     */
+    public void setConfiguration(WireTargetConfiguration config);
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetWireFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/TargetWireFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,43 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+import org.apache.tuscany.common.TuscanyException;
+
+/**
+ * Denotes a top-level exception dealing with a wire
+ */
+public abstract class WireException extends TuscanyException {
+
+    public WireException() {
+        super();
+    }
+
+    public WireException(String message) {
+        super(message);
+    }
+
+    public WireException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public WireException(Throwable cause) {
+        super(cause);
+    }
+
+}
+

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactory.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactory.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactory.java Tue May  2 23:09:37 2006
@@ -0,0 +1,76 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Implementations are responsible for managing source or target sides of a wire, including creation of service proxies.
+ * Source-side wires are injected on references and may contain policy interceptors and/or handlers specified by them. Target-side
+ * wires may contain policy interceptors and/or handlers specified by the service the wire is targeted to or one of its
+ * operations. Source- and target-side <code>WireFactory</code>s are held in the {@link org.apache.tuscany.core.builder.ContextFactory}
+ * associated with the source reference or target service.
+ * <p/>
+ * When an assembly is built by the runtime, source-side and target-side wires are "bridged" on the source side (i.e. a reference
+ * to the target-side is stored in the source-side). This bridging process is done by a series of {@link
+ * org.apache.tuscany.core.builder.WireBuilder}s configured in the runtime. When a new component implementation instance is
+ * created, it will be injected with a proxy for each reference containing the bridged source- and target-side wires.
+ * <p/>
+ * Unmanaged code, i.e. clients that are not components, that perform a locate operation are handled differently. In this case, a
+ * target-side proxy will be returned by the locate operation created by the <code>WireFactory</code> associated with the target
+ * service. This target-side proxy will only contain the target-side wire and its handlers/interceptors.Ê
+ * <p/>
+ * Wires are structured by operation; that is, they contain an invocation chain per operation on a service. Note that the service
+ * specified by a reference may differ in type from the target service specified by the wire. In this case, a mediation may be
+ * performed by the runtime. Hence, source-to-target bridging is done on a per operation basis. Source- and target-side Invocation
+ * chains are accessible through the subtypes of <code>WireFactory</code>.
+ *
+ * @version $Rev: 396284 $ $Date: 2006-04-23 16:27:42 +0100 (Sun, 23 Apr 2006) $
+ */
+public interface WireFactory<T> {
+
+    /**
+     * Prepares the factory. This will typically be called at buildSource time, after bridging source- and target-side invocation chains.
+     *
+     * @throws WireFactoryInitException if an error is encountered during initialization
+     */
+    public void initialize() throws WireFactoryInitException;
+
+    /**
+     * Returns a proxy for a service specified by a reference or target
+     */
+    public T createProxy() throws ProxyCreationException;
+
+    /**
+     * Sets the primary interface type generated proxies implement
+     */
+    public void setBusinessInterface(Class interfaze);
+
+    /**
+     * Returns the primary interface type implemented by generated proxies
+     */
+    public Class getBusinessInterface();
+
+    /**
+     * Adds an interface type generated proxies implement
+     */
+    public void addInterface(Class claz);
+
+    /**
+     * Returns an array of all interfaces implemented by generated proxies
+     */
+    public Class[] getImplementatedInterfaces();
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryFactory.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryFactory.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryFactory.java Tue May  2 23:09:37 2006
@@ -0,0 +1,47 @@
+/**
+ * 
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ * 
+ * Licensed 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.spi.wire;
+
+import java.lang.reflect.InvocationHandler;
+
+/**
+ * Implementations provide a runtime system service that creates {@link org.apache.tuscany.spi.wire.WireFactory}s
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface WireFactoryFactory {
+
+    /**
+     * Creates a target-side wire factory
+     */
+    public TargetWireFactory createTargetWireFactory();
+
+    /**
+     * Creates a source-side wire factory
+     */
+    public SourceWireFactory createSourceWireFactory();
+
+    /**
+     * Determines whether the given object is a proxy
+     */
+    public boolean isProxy(Object object);
+
+    /**
+     * Returns an wire handler fronting the wire chains used by the proxy. Note that should SCA define a
+     * DII, this could return such an interface.
+     * 
+     * @throws IllegalArgumentException if the class is not a proxy
+     */
+    public InvocationHandler getHandler(Object proxy) throws IllegalArgumentException;
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryInitException.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryInitException.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryInitException.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryInitException.java Tue May  2 23:09:37 2006
@@ -0,0 +1,43 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * Denotes an error initializing a wire factory
+ * 
+ * @version $Rev: 396284 $ $Date: 2006-04-23 16:27:42 +0100 (Sun, 23 Apr 2006) $
+ */
+public class WireFactoryInitException extends WireException {
+
+    public WireFactoryInitException() {
+        super();
+    }
+
+    public WireFactoryInitException(String message) {
+        super(message);
+    }
+
+    public WireFactoryInitException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public WireFactoryInitException(Throwable cause) {
+        super(cause);
+    }
+
+}
+

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryInitException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireFactoryInitException.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireSourceConfiguration.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireSourceConfiguration.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireSourceConfiguration.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireSourceConfiguration.java Tue May  2 23:09:37 2006
@@ -0,0 +1,23 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WireSourceConfiguration {
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireSourceConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireSourceConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireTargetConfiguration.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireTargetConfiguration.java?rev=399161&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireTargetConfiguration.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireTargetConfiguration.java Tue May  2 23:09:37 2006
@@ -0,0 +1,23 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed 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.spi.wire;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WireTargetConfiguration {
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireTargetConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/wire/WireTargetConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date



Mime
View raw message