Search in sources :

Example 46 with Promise

use of io.joynr.provider.Promise in project joynr by bmwcarit.

the class IltProvider method methodToFireBroadcastWithMultipleStructParameters.

/*
     * methodToFireBroadcastWithMultipleStructParameters
     */
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithMultipleStructParameters(String[] partitions) {
    logger.warn("**********************************************************************");
    logger.warn("* IltProvider.methodToFireBroadcastWithMultipleStructParameters called");
    logger.warn("**********************************************************************");
    DeferredVoid deferred = new DeferredVoid();
    BaseStructWithoutElements baseStructWithoutElementsOut = IltUtil.createBaseStructWithoutElements();
    ExtendedExtendedBaseStruct extendedExtendedBaseStructOut = IltUtil.createExtendedExtendedBaseStruct();
    fireBroadcastWithMultipleStructParameters(baseStructWithoutElementsOut, extendedExtendedBaseStructOut, partitions);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) ExtendedExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct) BaseStructWithoutElements(joynr.interlanguagetest.namedTypeCollection2.BaseStructWithoutElements) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 47 with Promise

use of io.joynr.provider.Promise 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 48 with Promise

use of io.joynr.provider.Promise in project joynr by bmwcarit.

the class IltProvider method overloadedMethodWithSelector.

/*
     * overloadedMethodWithSelector (1)
     */
@Override
public Promise<OverloadedMethodWithSelector1Deferred> overloadedMethodWithSelector() {
    logger.warn("*************************************************");
    logger.warn("* IltProvider.overloadedMethodWithSelector called");
    logger.warn("*************************************************");
    OverloadedMethodWithSelector1Deferred deferred = new OverloadedMethodWithSelector1Deferred();
    String stringOut = "Return value from overloadedMethodWithSelector 1";
    deferred.resolve(stringOut);
    return new Promise<OverloadedMethodWithSelector1Deferred>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString)

Example 49 with Promise

use of io.joynr.provider.Promise 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 50 with Promise

use of io.joynr.provider.Promise in project joynr by bmwcarit.

the class IltProvider method overloadedMethod.

/*
     * overloadedMethod (1)
     */
@Override
public Promise<OverloadedMethod1Deferred> overloadedMethod() {
    logger.warn("*****************************************");
    logger.warn("* IltProvider.overloadedMethod called (1)");
    logger.warn("*****************************************");
    OverloadedMethod1Deferred deferred = new OverloadedMethod1Deferred();
    String stringOut = "TestString 1";
    deferred.resolve(stringOut);
    return new Promise<OverloadedMethod1Deferred>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString)

Aggregations

Promise (io.joynr.provider.Promise)79 DeferredVoid (io.joynr.provider.DeferredVoid)36 ProviderRuntimeException (joynr.exceptions.ProviderRuntimeException)27 MapStringString (joynr.interlanguagetest.namedTypeCollection2.MapStringString)13 Method (java.lang.reflect.Method)9 ProviderWrapper (io.joynr.jeeintegration.ProviderWrapper)6 JoynrProvider (io.joynr.provider.JoynrProvider)6 Test (org.junit.Test)6 JoynrException (io.joynr.exceptions.JoynrException)5 Deferred (io.joynr.provider.Deferred)4 PromiseListener (io.joynr.provider.PromiseListener)4 ExtendedExtendedBaseStruct (joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct)4 GlobalDiscoveryEntry (joynr.types.GlobalDiscoveryEntry)4 StructWithStringArray (joynr.interlanguagetest.namedTypeCollection1.StructWithStringArray)3 ExtendedTypeCollectionEnumerationInTypeCollection (joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection)3 DiscoveryEntry (joynr.types.DiscoveryEntry)3 DiscoveryEntryWithMetaInfo (joynr.types.DiscoveryEntryWithMetaInfo)3 DiscoveryQos (io.joynr.arbitration.DiscoveryQos)2 DiscoveryScope (io.joynr.arbitration.DiscoveryScope)2 ProviderContainer (io.joynr.provider.ProviderContainer)2