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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations