From 132aa8a77685ec92bc90c03f987650d275a7b639 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 30 Sep 2013 06:59:11 +0000 Subject: 2.0.1 RC1 release tag git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1527464 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/PrimitivesLocalServiceClientImpl.java | 138 +++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java') diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java new file mode 100644 index 0000000000..eea19521c4 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java @@ -0,0 +1,138 @@ +/* + * 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.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient; +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Service; + +/** + * An implementation of PrimitivesLocalServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(PrimitivesServiceClient.class) +public class PrimitivesLocalServiceClientImpl implements PrimitivesServiceClient { + + private PrimitivesLocalService service; + + @Reference(required=false) + protected void setPrimitivesLocalService(PrimitivesLocalService service) { + this.service = service; + } + + public boolean negateBooleanForward(boolean flag) { + return service.negateBoolean(flag); + } + + public boolean[] negateBooleanArrayForward(boolean[] flags) { + return service.negateBooleanArray(flags); + } + + public boolean passByValueBooleanArray() { + boolean[] req = new boolean[2]; + boolean[] resp = service.identityBooleanArray(req); + return req != resp; + } + + public byte negateByteForward(byte b) { + return service.negateByte(b); + } + + public byte[] negateByteArrayForward(byte[] ba) { + return service.negateByteArray(ba); + } + + public boolean passByValueByteArray() { + byte[] req = new byte[2]; + byte[] resp = service.identityByteArray(req); + return req != resp; + } + + public short negateShortForward(short s) { + return service.negateShort(s); + } + + public short[] negateShortArrayForward(short[] s) { + return service.negateShortArray(s); + } + + public boolean passByValueShortArray() { + short[] req = new short[2]; + short[] resp = service.identityShortArray(req); + return req != resp; + } + + public int negateIntForward(int i) { + return service.negateInt(i); + } + + public int[] negateIntArrayForward(int[] ia) { + return service.negateIntArray(ia); + } + + public boolean passByValueIntArray() { + int[] req = new int[2]; + int[] resp = service.identityIntArray(req); + return req != resp; + } + + public long negateLongForward(long l) { + return service.negateLong(l); + } + + public long[] negateLongArrayForward(long[] la) { + return service.negateLongArray(la); + } + + public boolean passByValueLongArray() { + long[] req = new long[2]; + long[] resp = service.identityLongArray(req); + return req != resp; + } + + public float negateFloatForward(float f) { + return service.negateFloat(f); + } + + public float[] negateFloatArrayForward(float[] fa) { + return service.negateFloatArray(fa); + } + + public boolean passByValueFloatArray() { + float[] req = new float[2]; + float[] resp = service.identityFloatArray(req); + return req != resp; + } + + public double negateDoubleForward(double d) { + return service.negateDouble(d); + } + + public double[] negateDoubleArrayForward(double[] da) { + return service.negateDoubleArray(da); + } + + public boolean passByValueDoubleArray() { + double[] req = new double[2]; + double[] resp = service.identityDoubleArray(req); + return req != resp; + } +} -- cgit v1.2.3