use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method methodWithSingleStructParameters.
/*
* methodWithSingleStructParameters
*/
@Override
public Promise<MethodWithSingleStructParametersDeferred> methodWithSingleStructParameters(ExtendedBaseStruct extendedBaseStructArg) {
logger.warn("*****************************************************");
logger.warn("* IltProvider.methodWithSingleStructParameters called");
logger.warn("*****************************************************");
MethodWithSingleStructParametersDeferred deferred = new MethodWithSingleStructParametersDeferred();
if (!IltUtil.checkExtendedBaseStruct(extendedBaseStructArg)) {
logger.error("methodWithSingleStructParameters: invalid parameter extendedBaseStructArg");
deferred.reject(new ProviderRuntimeException("methodWithSingleStructParameters: invalid parameter extendedBaseStructArg"));
return new Promise<MethodWithSingleStructParametersDeferred>(deferred);
}
// prepare output parameters
ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
deferred.resolve(extendedStructOfPrimitivesOut);
return new Promise<MethodWithSingleStructParametersDeferred>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method setAttributeExtendedExtendedBaseStruct.
@Override
public Promise<DeferredVoid> setAttributeExtendedExtendedBaseStruct(ExtendedExtendedBaseStruct attributeExtendedExtendedBaseStruct) {
DeferredVoid deferred = new DeferredVoid();
this.attributeExtendedExtendedBaseStruct = attributeExtendedExtendedBaseStruct;
attributeExtendedExtendedBaseStructChanged(attributeExtendedExtendedBaseStruct);
deferred.resolve();
return new Promise<DeferredVoid>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method methodWithSingleArrayParameters.
/*
* methodWithSingleArrayParameters
*
* Return an array with the stringified double entries
*/
@Override
public Promise<MethodWithSingleArrayParametersDeferred> methodWithSingleArrayParameters(Double[] doubleArrayArg) {
logger.warn("****************************************************");
logger.warn("* IltProvider.methodWithSingleArrayParameters called");
logger.warn("****************************************************");
MethodWithSingleArrayParametersDeferred deferred = new MethodWithSingleArrayParametersDeferred();
// check input parameter
if (!IltUtil.checkDoubleArray(doubleArrayArg)) {
logger.warn("methodWithMultiplePrimitiveParameters: invalid argument doubleArrayArg");
deferred.reject(new ProviderRuntimeException("methodWithSingleArrayParameters: received wrong argument"));
return new Promise<MethodWithSingleArrayParametersDeferred>(deferred);
}
// prepare output parameter
String[] stringArrayOut = IltUtil.createStringArray();
deferred.resolve(stringArrayOut);
return new Promise<MethodWithSingleArrayParametersDeferred>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method setAttributeMapStringString.
@Override
public Promise<DeferredVoid> setAttributeMapStringString(MapStringString attributeMapStringString) {
DeferredVoid deferred = new DeferredVoid();
this.attributeMapStringString = attributeMapStringString;
attributeMapStringStringChanged(attributeMapStringString);
deferred.resolve();
return new Promise<DeferredVoid>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method methodToFireBroadcastWithMultiplePrimitiveParameters.
/*
* methodToFireBroadcastWithMultiplePrimitiveParameters
*/
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithMultiplePrimitiveParameters(String[] partitions) {
logger.warn("*************************************************************************");
logger.warn("* IltProvider.methodToFireBroadcastWithMultiplePrimitiveParameters called");
logger.warn("*************************************************************************");
DeferredVoid deferred = new DeferredVoid();
Double doubleOut = 1.1d;
String stringOut = "boom";
fireBroadcastWithMultiplePrimitiveParameters(doubleOut, stringOut, partitions);
deferred.resolve();
return new Promise<DeferredVoid>(deferred);
}
Aggregations