use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.
the class IltProvider method methodWithMultipleStructParameters.
/*
* methodWithMultipleStructParameters
*/
@Override
public Promise<MethodWithMultipleStructParametersDeferred> methodWithMultipleStructParameters(ExtendedStructOfPrimitives extendedStructOfPrimitivesArg, BaseStruct baseStructArg) {
MethodWithMultipleStructParametersDeferred deferred = new MethodWithMultipleStructParametersDeferred();
logger.warn("*******************************************************");
logger.warn("* IltProvider.methodWithMultipleStructParameters called");
logger.warn("*******************************************************");
// check input parameter
if (!IltUtil.checkExtendedStructOfPrimitives(extendedStructOfPrimitivesArg)) {
deferred.reject(new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter extendedStructOfPrimitivesArg"));
return new Promise<MethodWithMultipleStructParametersDeferred>(deferred);
}
if (!IltUtil.checkBaseStruct(baseStructArg)) {
deferred.reject(new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter baseStructArg"));
return new Promise<MethodWithMultipleStructParametersDeferred>(deferred);
}
// set output values
BaseStructWithoutElements baseStructWithoutElementsOut = IltUtil.createBaseStructWithoutElements();
ExtendedExtendedBaseStruct extendedExtendedBaseStructOut = IltUtil.createExtendedExtendedBaseStruct();
deferred.resolve(baseStructWithoutElementsOut, extendedExtendedBaseStructOut);
return new Promise<MethodWithMultipleStructParametersDeferred>(deferred);
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives 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 joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.
the class IltConsumerSyncMethodTest method callMethodWithMultipleStructParameters.
@Test
public void callMethodWithMultipleStructParameters() {
LOG.info(name.getMethodName() + "");
try {
MethodWithMultipleStructParametersReturned result;
// setup input parameters
ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
BaseStruct baseStructOut = IltUtil.createBaseStruct();
result = testInterfaceProxy.methodWithMultipleStructParameters(extendedStructOfPrimitivesOut, baseStructOut);
if (result == null) {
fail(name.getMethodName() + " - FAILED - got no result");
return;
}
if (!IltUtil.checkBaseStructWithoutElements(result.baseStructWithoutElementsOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - baseStructWithoutElementsOut");
return;
}
if (!IltUtil.checkExtendedExtendedBaseStruct(result.extendedExtendedBaseStructOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - extendedExtendedBaseStructOut");
return;
}
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.
the class IltConsumerSyncMethodTest method callMethodWithSingleStructParameters.
@Test
public void callMethodWithSingleStructParameters() {
LOG.info(name.getMethodName() + "");
try {
ExtendedBaseStruct arg = IltUtil.createExtendedBaseStruct();
ExtendedStructOfPrimitives result;
result = testInterfaceProxy.methodWithSingleStructParameters(arg);
if (result == null) {
fail(name.getMethodName() + " - FAILED - got no result");
return;
}
if (!IltUtil.checkExtendedStructOfPrimitives(result)) {
fail(name.getMethodName() + " - FAILED - got invalid result - extendedStructOfPrimitives");
return;
}
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives 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);
}
Aggregations