use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method overloadedMethodWithSelector.
/*
* overloadedMethodWithSelector (2)
*/
@Override
public Promise<OverloadedMethodWithSelector1Deferred> overloadedMethodWithSelector(Boolean booleanArg) {
logger.warn("*************************************************");
logger.warn("* IltProvider.overloadedMethodWithSelector called");
logger.warn("*************************************************");
OverloadedMethodWithSelector1Deferred deferred = new OverloadedMethodWithSelector1Deferred();
// check input parameter
if (booleanArg != false) {
logger.warn("overloadedMethodWithSelector: invalid argument booleanArg");
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: invalid parameter booleanArg"));
return new Promise<OverloadedMethodWithSelector1Deferred>(deferred);
}
// setup output parameter
String stringOut = "Return value from overloadedMethodWithSelector 2";
deferred.resolve(stringOut);
return new Promise<OverloadedMethodWithSelector1Deferred>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method methodToFireBroadcastWithMultipleByteBufferParameters.
/*
* methodToFireBroadcastWithMultipleByteBufferParameters
*/
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithMultipleByteBufferParameters(Byte[] byteBufferIn1, Byte[] byteBufferIn2, String[] partitions) {
logger.info("**************************************************************************");
logger.info("* IltProvider.methodToFireBroadcastWithMultipleByteBufferParameters called");
logger.info("**************************************************************************");
DeferredVoid deferred = new DeferredVoid();
fireBroadcastWithMultipleByteBufferParameters(byteBufferIn1, byteBufferIn2, partitions);
deferred.resolve();
return new Promise<DeferredVoid>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method methodToFireBroadcastWithSingleEnumerationParameter.
/*
* methodToFireBroadcastWithSingleEnumerationParameter
*/
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithSingleEnumerationParameter(String[] partitions) {
logger.warn("************************************************************************");
logger.warn("* IltProvider.methodToFireBroadcastWithSingleEnumerationParameter called");
logger.warn("************************************************************************");
DeferredVoid deferred = new DeferredVoid();
ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
fireBroadcastWithSingleEnumerationParameter(enumerationOut, partitions);
deferred.resolve();
return new Promise<DeferredVoid>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method methodWithoutErrorEnum.
/*
* methodWithoutErrorEnum
*/
@Override
public Promise<DeferredVoid> methodWithoutErrorEnum(String wantedExceptionArg) {
logger.warn("*******************************************");
logger.warn("* IltProvider.methodWithoutErrorEnum called");
logger.warn("*******************************************");
DeferredVoid deferred = new DeferredVoid();
if (wantedExceptionArg.equals("ProviderRuntimeException")) {
deferred.reject(new ProviderRuntimeException("Exception from methodWithoutErrorEnum"));
} else {
deferred.resolve();
}
return new Promise<DeferredVoid>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class IltProvider method setAttributeWithExceptionFromSetter.
@Override
public Promise<DeferredVoid> setAttributeWithExceptionFromSetter(Boolean attributeWithExceptionFromSetter) {
DeferredVoid deferred = new DeferredVoid();
deferred.reject(new ProviderRuntimeException("Exception from setAttributeWithExceptionFromSetter"));
return new Promise<DeferredVoid>(deferred);
}
Aggregations