Search in sources :

Example 41 with Promise

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

the class IltProvider method setAttributeFireAndForget.

@Override
public Promise<DeferredVoid> setAttributeFireAndForget(Integer attributeFireAndForget) {
    DeferredVoid deferred = new DeferredVoid();
    this.attributeFireAndForget = attributeFireAndForget;
    attributeFireAndForgetChanged(attributeFireAndForget);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 42 with Promise

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

the class IltProvider method setAttributeUInt8.

@Override
public Promise<DeferredVoid> setAttributeUInt8(Byte attributeUInt8) {
    DeferredVoid deferred = new DeferredVoid();
    this.attributeUInt8 = attributeUInt8;
    attributeUInt8Changed(attributeUInt8);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 43 with Promise

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

the class IltProvider method methodToFireBroadcastWithSingleStructParameter.

/*
     * methodToFireBroadcastWithSingleStructParameter
     */
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithSingleStructParameter(String[] partitions) {
    logger.warn("*******************************************************************");
    logger.warn("* IltProvider.methodToFireBroadcastWithSingleStructParameter called");
    logger.warn("*******************************************************************");
    DeferredVoid deferred = new DeferredVoid();
    ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
    fireBroadcastWithSingleStructParameter(extendedStructOfPrimitivesOut, partitions);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) ExtendedStructOfPrimitives(joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 44 with Promise

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

the class IltProvider method setAttributeDouble.

@Override
public Promise<DeferredVoid> setAttributeDouble(Double attributeDouble) {
    DeferredVoid deferred = new DeferredVoid();
    this.attributeDouble = attributeDouble;
    attributeDoubleChanged(attributeDouble);
    deferred.resolve();
    return new Promise<DeferredVoid>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) DeferredVoid(io.joynr.provider.DeferredVoid)

Example 45 with Promise

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

the class IltProvider method methodWithAnonymousErrorEnum.

/*
     * methodWithAnonymousErrorEnum
     */
@Override
public Promise<MethodWithAnonymousErrorEnumDeferred> methodWithAnonymousErrorEnum(String wantedExceptionArg) {
    logger.warn("*************************************************");
    logger.warn("* IltProvider.methodWithAnonymousErrorEnum called");
    logger.warn("*************************************************");
    MethodWithAnonymousErrorEnumDeferred deferred = new MethodWithAnonymousErrorEnumDeferred();
    if (wantedExceptionArg.equals("ProviderRuntimeException")) {
        deferred.reject(new ProviderRuntimeException("Exception from methodWithAnonymousErrorEnum"));
    } else if (wantedExceptionArg.equals("ApplicationException")) {
        deferred.reject(MethodWithAnonymousErrorEnumErrorEnum.ERROR_3_1_NTC);
    } else {
        deferred.resolve();
    }
    return new Promise<MethodWithAnonymousErrorEnumDeferred>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException)

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