Search in sources :

Example 6 with StructWithStringArray

use of joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray in project joynr by bmwcarit.

the class IltConsumerSyncMethodTest method callMethodWithMultipleArrayParameters.

@Test
public void callMethodWithMultipleArrayParameters() {
    LOG.info(name.getMethodName() + "");
    try {
        String[] arg1 = IltUtil.createStringArray();
        Byte[] arg2 = IltUtil.createByteArray();
        ExtendedInterfaceEnumerationInTypeCollection[] arg3 = IltUtil.createExtendedInterfaceEnumerationInTypeCollectionArray();
        StructWithStringArray[] arg4 = IltUtil.createStructWithStringArrayArray();
        MethodWithMultipleArrayParametersReturned result;
        result = testInterfaceProxy.methodWithMultipleArrayParameters(arg1, arg2, arg3, arg4);
        if (result == null) {
            fail(name.getMethodName() + " - FAILED - got no result");
            return;
        }
        if (!IltUtil.checkUInt64Array(result.uInt64ArrayOut)) {
            fail(name.getMethodName() + " - FAILED - got invalid result - stringArrayArg");
            return;
        }
        if (result.structWithStringArrayArrayOut.length != 2) {
            fail(name.getMethodName() + " - FAILED - got invalid result - structWithStringArrayArrayOut");
            return;
        }
        if (!IltUtil.checkStructWithStringArray(result.structWithStringArrayArrayOut[0])) {
            fail(name.getMethodName() + " - FAILED - got invalid result - structWithStringArrayArrayOut[0]");
            return;
        }
        if (!IltUtil.checkStructWithStringArray(result.structWithStringArrayArrayOut[1])) {
            fail(name.getMethodName() + " - FAILED - got invalid result - structWithStringArrayArrayOut[1]");
            return;
        }
    } catch (Exception e) {
        fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
        return;
    }
    LOG.info(name.getMethodName() + " - OK");
}
Also used : ExtendedInterfaceEnumerationInTypeCollection(joynr.interlanguagetest.namedTypeCollection2.ExtendedInterfaceEnumerationInTypeCollection) MethodWithMultipleArrayParametersReturned(joynr.interlanguagetest.TestInterfaceSync.MethodWithMultipleArrayParametersReturned) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString) StructWithStringArray(joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray) ApplicationException(joynr.exceptions.ApplicationException) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException) Test(org.junit.Test)

Example 7 with StructWithStringArray

use of joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray in project joynr by bmwcarit.

the class IltUtil method createStructWithStringArray.

public static StructWithStringArray createStructWithStringArray() {
    StructWithStringArray structWithStringArray = new StructWithStringArray();
    fillStructWithStringArray(structWithStringArray);
    return structWithStringArray;
}
Also used : StructWithStringArray(joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray)

Example 8 with StructWithStringArray

use of joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray in project joynr by bmwcarit.

the class IltProvider method methodToFireBroadcastWithMultipleArrayParameters.

/*
     * methodToFireBroadcastWithMultipleArrayParameters
     */
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithMultipleArrayParameters(String[] partitions) {
    logger.warn("*********************************************************************");
    logger.warn("* IltProvider.methodToFireBroadcastWithMultipleArrayParameters called");
    logger.warn("*********************************************************************");
    DeferredVoid deferred = new DeferredVoid();
    Long[] uInt64ArrayOut = IltUtil.createUInt64Array();
    StructWithStringArray[] structWithStringArrayArrayOut = IltUtil.createStructWithStringArrayArray();
    fireBroadcastWithMultipleArrayParameters(uInt64ArrayOut, structWithStringArrayArrayOut, partitions);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) StructWithStringArray(joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 9 with StructWithStringArray

use of joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray in project joynr by bmwcarit.

the class IltProvider method methodToFireBroadcastWithFiltering.

/*
     * methodToFireBroadcastWithFiltering
     */
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithFiltering(String stringArg) {
    logger.warn("*******************************************************");
    logger.warn("* IltProvider.methodToFireBroadcastWithFiltering called");
    logger.warn("*******************************************************");
    DeferredVoid deferred = new DeferredVoid();
    // take the stringArg as input for the filtering
    String stringOut = stringArg;
    String[] stringArrayOut = IltUtil.createStringArray();
    ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
    StructWithStringArray structWithStringArrayOut = IltUtil.createStructWithStringArray();
    StructWithStringArray[] structWithStringArrayArrayOut = IltUtil.createStructWithStringArrayArray();
    fireBroadcastWithFiltering(stringOut, stringArrayOut, enumerationOut, structWithStringArrayOut, structWithStringArrayArrayOut);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) ExtendedTypeCollectionEnumerationInTypeCollection(joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString) StructWithStringArray(joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 10 with StructWithStringArray

use of joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray in project joynr by bmwcarit.

the class IltProviderBean method methodToFireBroadcastWithFiltering.

/*
     * methodToFireBroadcastWithFiltering
     */
@Override
public void methodToFireBroadcastWithFiltering(String stringArg) {
    logger.warn("*******************************************************");
    logger.warn("* IltProvider.methodToFireBroadcastWithFiltering called");
    logger.warn("*******************************************************");
    // take the stringArg as input for the filtering
    String stringOut = stringArg;
    String[] stringArrayOut = IltUtil.createStringArray();
    ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
    StructWithStringArray structWithStringArrayOut = IltUtil.createStructWithStringArray();
    StructWithStringArray[] structWithStringArrayArrayOut = IltUtil.createStructWithStringArrayArray();
// TODO
// fireBroadcastWithFiltering(stringOut,
// stringArrayOut,
// enumerationOut,
// structWithStringArrayOut,
// structWithStringArrayArrayOut);
}
Also used : ExtendedTypeCollectionEnumerationInTypeCollection(joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString) StructWithStringArray(joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray)

Aggregations

StructWithStringArray (joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray)10 ExtendedTypeCollectionEnumerationInTypeCollection (joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection)4 MapStringString (joynr.interlanguagetest.namedTypeCollection2.MapStringString)4 Promise (io.joynr.provider.Promise)3 ProviderRuntimeException (joynr.exceptions.ProviderRuntimeException)3 Test (org.junit.Test)3 DeferredVoid (io.joynr.provider.DeferredVoid)2 ApplicationException (joynr.exceptions.ApplicationException)2 MethodWithMultipleArrayParametersReturned (joynr.interlanguagetest.TestInterfaceSync.MethodWithMultipleArrayParametersReturned)2 ExtendedInterfaceEnumerationInTypeCollection (joynr.interlanguagetest.namedTypeCollection2.ExtendedInterfaceEnumerationInTypeCollection)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 SuppressWarnings (edu.umd.cs.findbugs.annotations.SuppressWarnings)1 SubscriptionException (io.joynr.exceptions.SubscriptionException)1 IOException (java.io.IOException)1 PrintWriter (java.io.PrintWriter)1 StringWriter (java.io.StringWriter)1 OnChangeWithKeepAliveSubscriptionQos (joynr.OnChangeWithKeepAliveSubscriptionQos)1 BroadcastWithFilteringBroadcastAdapter (joynr.interlanguagetest.TestInterfaceBroadcastInterface.BroadcastWithFilteringBroadcastAdapter)1 BroadcastWithFilteringBroadcastFilterParameters (joynr.interlanguagetest.TestInterfaceBroadcastInterface.BroadcastWithFilteringBroadcastFilterParameters)1