use of joynr.exceptions.ProviderRuntimeException 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);
}
use of joynr.exceptions.ProviderRuntimeException in project joynr by bmwcarit.
the class IltProvider method overloadedMethodWithSelector.
/*
* overloadedMethodWithSelector (3)
*/
@Override
public Promise<OverloadedMethodWithSelector2Deferred> overloadedMethodWithSelector(ExtendedExtendedEnumeration[] enumArrayArg, Long int64Arg, BaseStruct baseStructArg, Boolean booleanArg) {
logger.warn("*************************************************");
logger.warn("* IltProvider.overloadedMethodWithSelector called");
logger.warn("*************************************************");
OverloadedMethodWithSelector2Deferred deferred = new OverloadedMethodWithSelector2Deferred();
/* check input */
if (!IltUtil.checkExtendedExtendedEnumerationArray(enumArrayArg)) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare enumArrayArg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
if (int64Arg != 1L) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare int64Arg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
if (!IltUtil.checkBaseStruct(baseStructArg)) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare baseStructArg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
if (booleanArg != false) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare booleanArg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
/* prepare output */
Double doubleOut = 1.1d;
String[] stringArrayOut = IltUtil.createStringArray();
ExtendedBaseStruct extendedBaseStructOut = IltUtil.createExtendedBaseStruct();
deferred.resolve(doubleOut, stringArrayOut, extendedBaseStructOut);
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
use of joynr.exceptions.ProviderRuntimeException in project joynr by bmwcarit.
the class IltProviderBean method methodWithSingleEnumParameters.
/*
* methodWithSingleEnumParameters
*
* return fixed value for now
*/
@Override
public ExtendedTypeCollectionEnumerationInTypeCollection methodWithSingleEnumParameters(ExtendedEnumerationWithPartlyDefinedValues enumerationArg) {
logger.warn("***************************************************");
logger.warn("* IltProvider.methodWithSingleEnumParameters called");
logger.warn("***************************************************");
// check input parameter
if (enumerationArg != ExtendedEnumerationWithPartlyDefinedValues.ENUM_2_VALUE_EXTENSION_FOR_ENUM_WITHOUT_DEFINED_VALUES) {
logger.warn("methodWithSingleEnumParameters: invalid argument enumerationArg");
throw new ProviderRuntimeException("methodWithSingleEnumParameters: received wrong argument");
}
// prepare output parameter
ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
return enumerationOut;
}
use of joynr.exceptions.ProviderRuntimeException in project joynr by bmwcarit.
the class IltProviderBean method methodWithSingleStructParameters.
/*
* methodWithSingleStructParameters
*/
@Override
public ExtendedStructOfPrimitives methodWithSingleStructParameters(ExtendedBaseStruct extendedBaseStructArg) {
logger.warn("*****************************************************");
logger.warn("* IltProvider.methodWithSingleStructParameters called");
logger.warn("*****************************************************");
if (!IltUtil.checkExtendedBaseStruct(extendedBaseStructArg)) {
logger.error("methodWithSingleStructParameters: invalid parameter extendedBaseStructArg");
throw new ProviderRuntimeException("methodWithSingleStructParameters: invalid parameter extendedBaseStructArg");
}
// prepare output parameters
ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
return extendedStructOfPrimitivesOut;
}
use of joynr.exceptions.ProviderRuntimeException in project joynr by bmwcarit.
the class IltProviderBean method methodWithMultipleEnumParameters.
/*
* methodWithMultipleEnumParameters
*
* return fixed values for now
*/
@Override
public MethodWithMultipleEnumParametersReturned methodWithMultipleEnumParameters(Enumeration enumerationArg, ExtendedTypeCollectionEnumerationInTypeCollection extendedEnumerationArg) {
logger.warn("*****************************************************");
logger.warn("* IltProvider.methodWithMultipleEnumParameters called");
logger.warn("*****************************************************");
// check input parameters
if (enumerationArg != joynr.interlanguagetest.Enumeration.ENUM_0_VALUE_3 || extendedEnumerationArg != ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION) {
logger.warn("methodWithMultipleEnumParameters: invalid argument enumerationArg or extendedEnumerationArg");
throw new ProviderRuntimeException("methodWithMultipleEnumParameters: received wrong argument");
}
// prepare output parameters
ExtendedEnumerationWithPartlyDefinedValues extendedEnumerationOut = ExtendedEnumerationWithPartlyDefinedValues.ENUM_2_VALUE_EXTENSION_FOR_ENUM_WITHOUT_DEFINED_VALUES;
Enumeration enumerationOut = Enumeration.ENUM_0_VALUE_1;
return new MethodWithMultipleEnumParametersReturned(extendedEnumerationOut, enumerationOut);
}
Aggregations