You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/04/04 05:28:26 UTC

svn commit: r525386 - in /incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection: ./ JavaInterfaceIntrospector.java JavaInterfaceProcessor.java JavaInterfaceProcessorRegistry.java

Author: rfeng
Date: Tue Apr  3 20:28:25 2007
New Revision: 525386

URL: http://svn.apache.org/viewvc?view=rev&rev=525386
Log:
Add JavaInterface introspector/processor/processor registry

Added:
    incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/
    incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java   (with props)
    incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java   (with props)
    incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java   (with props)

Added: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java?view=auto&rev=525386
==============================================================================
--- incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java (added)
+++ incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java Tue Apr  3 20:28:25 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.idl.java.introspection;
+
+import org.apache.tuscany.idl.InvalidInterfaceException;
+import org.apache.tuscany.idl.java.JavaInterface;
+
+/**
+ * Processor for creating JavaServiceContract definitions from Java Classes.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface JavaInterfaceIntrospector {
+
+    /**
+     * Introspect a Java interface and return a service contract definition.
+     *
+     * @param type the interface to inspect
+     * @return a JavaServiceContract corresponding to the Java interface
+     */
+    <I> JavaInterface introspect(Class<I> type) throws InvalidInterfaceException;
+
+}

Propchange: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceIntrospector.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java?view=auto&rev=525386
==============================================================================
--- incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java (added)
+++ incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java Tue Apr  3 20:28:25 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.idl.java.introspection;
+
+import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.idl.InvalidInterfaceException;
+
+/**
+ * Implementations introspect metadata on a Java interface, populating the
+ * corresponding {@link JavaServiceContract}
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface JavaInterfaceProcessor {
+
+    /**
+     * @param clazz
+     * @param callbackClass
+     * @param contract
+     * @throws InvalidInterfaceException
+     */
+    void visitInterface(Class<?> clazz, Class<?> callbackClass, Contract contract)
+        throws InvalidInterfaceException;
+
+}

Propchange: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java?view=auto&rev=525386
==============================================================================
--- incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java (added)
+++ incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java Tue Apr  3 20:28:25 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.idl.java.introspection;
+
+/**
+ * A registry of {@link JavaInterfaceProcessor}s. Interface processors update a
+ * service contract definition based on a Java interface
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface JavaInterfaceProcessorRegistry extends JavaInterfaceIntrospector {
+
+    /**
+     * Registers the given processor
+     */
+    void registerProcessor(JavaInterfaceProcessor processor);
+
+    /**
+     * Deregisters the given processor
+     */
+    void unregisterProcessor(JavaInterfaceProcessor processor);
+
+}

Propchange: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/idl-java-xml/src/main/java/org/apache/tuscany/idl/java/introspection/JavaInterfaceProcessorRegistry.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org