You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2007/02/14 01:51:59 UTC
svn commit: r507340 - in /incubator/tuscany/java/sca/kernel:
core/src/main/java/org/apache/tuscany/core/wire/
spi/src/main/java/org/apache/tuscany/spi/wire/
Author: jmarino
Date: Tue Feb 13 16:51:58 2007
New Revision: 507340
URL: http://svn.apache.org/viewvc?view=rev&rev=507340
Log:
add new Wire implementation
Added:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java (with props)
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/Wire.java
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java?view=diff&rev=507340&r1=507339&r2=507340
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java Tue Feb 13 16:51:58 2007
@@ -159,11 +159,11 @@
throw new UnsupportedOperationException();
}
- public Map<Operation<?>, InboundInvocationChain> getCallbackInvocationChains() {
+ public Map<Operation<?>, InvocationChain> getCallbackInvocationChains() {
throw new UnsupportedOperationException();
}
- public void addCallbackInvocationChain(Operation<?> operation, InboundInvocationChain chain) {
+ public void addCallbackInvocationChain(Operation<?> operation, InvocationChain chain) {
throw new UnsupportedOperationException();
}
}
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java?view=diff&rev=507340&r1=507339&r2=507340
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java Tue Feb 13 16:51:58 2007
@@ -145,11 +145,11 @@
throw new UnsupportedOperationException();
}
- public Map<Operation<?>, InboundInvocationChain> getCallbackInvocationChains() {
+ public Map<Operation<?>, InvocationChain> getCallbackInvocationChains() {
throw new UnsupportedOperationException();
}
- public void addCallbackInvocationChain(Operation<?> operation, InboundInvocationChain chain) {
+ public void addCallbackInvocationChain(Operation<?> operation, InvocationChain chain) {
throw new UnsupportedOperationException();
}
}
Added: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java?view=auto&rev=507340
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java Tue Feb 13 16:51:58 2007
@@ -0,0 +1,122 @@
+/*
+ * 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.core.wire;
+
+import java.net.URI;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.spi.component.TargetResolutionException;
+import org.apache.tuscany.spi.model.Operation;
+import org.apache.tuscany.spi.model.ServiceContract;
+import org.apache.tuscany.spi.wire.InvocationChain;
+import org.apache.tuscany.spi.wire.Wire;
+
+/**
+ * Default implementation of a Wire
+ *
+ * @version $Rev$ $Date$
+ */
+public class WireImpl implements Wire {
+ private URI sourceUri;
+ private URI targetUri;
+ private String callbackReferenceName;
+ private QName bindingType;
+ private ServiceContract serviceContract;
+ private boolean optimizable;
+ private Map<Operation<?>, InvocationChain> chains = new HashMap<Operation<?>, InvocationChain>();
+ private Map<Operation<?>, InvocationChain> callbackChains = new HashMap<Operation<?>, InvocationChain>();
+
+
+ /**
+ * Creates a wire with the given binding type
+ *
+ * @param bindingType the binding type
+ */
+ public WireImpl(QName bindingType) {
+ this.bindingType = bindingType;
+ }
+
+ public URI getSourceUri() {
+ return sourceUri;
+ }
+
+ public void setSourceUri(URI sourceUri) {
+ this.sourceUri = sourceUri;
+ }
+
+ public URI getTargetUri() {
+ return targetUri;
+ }
+
+ public void setTargetUri(URI targetUri) {
+ this.targetUri = targetUri;
+ }
+
+ public String getCallbackReferenceName() {
+ return callbackReferenceName;
+ }
+
+ public void setCallbackReferenceName(String callbackReferenceName) {
+ this.callbackReferenceName = callbackReferenceName;
+ }
+
+ public QName getBindingType() {
+ return bindingType;
+ }
+
+
+ public ServiceContract getServiceContract() {
+ return serviceContract;
+ }
+
+ public void setServiceContract(ServiceContract serviceContract) {
+ this.serviceContract = serviceContract;
+ }
+
+ public boolean isOptimizable() {
+ return optimizable;
+ }
+
+ public void setOptimizable(boolean optimizable) {
+ this.optimizable = optimizable;
+ }
+
+ public Object getTargetService() throws TargetResolutionException {
+ return null;
+ }
+
+ public Map<Operation<?>, InvocationChain> getInvocationChains() {
+ return Collections.unmodifiableMap(chains);
+ }
+
+ public void addInvocationChain(Operation<?> operation, InvocationChain chain) {
+ chains.put(operation, chain);
+ }
+
+ public Map<Operation<?>, InvocationChain> getCallbackInvocationChains() {
+ return Collections.unmodifiableMap(callbackChains);
+ }
+
+ public void addCallbackInvocationChain(Operation<?> operation, InvocationChain chain) {
+ callbackChains.put(operation, chain);
+ }
+}
Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/Wire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/Wire.java?view=diff&rev=507340&r1=507339&r2=507340
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/Wire.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/Wire.java Tue Feb 13 16:51:58 2007
@@ -138,7 +138,7 @@
*
* @return the invocation chains for callback service operations associated with the wire
*/
- Map<Operation<?>, InboundInvocationChain> getCallbackInvocationChains();
+ Map<Operation<?>, InvocationChain> getCallbackInvocationChains();
/**
* Adds the callback invocation chain associated with the given operation
@@ -146,7 +146,7 @@
* @param operation the service operation
* @param chain the invocation chain
*/
- void addCallbackInvocationChain(Operation<?> operation, InboundInvocationChain chain);
+ void addCallbackInvocationChain(Operation<?> operation, InvocationChain chain);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org