Search in sources :

Example 6 with Deferred

use of io.joynr.provider.Deferred in project joynr by bmwcarit.

the class SubscriptionTestsProviderImpl method getAttributeWithProviderRuntimeException.

@Override
public Promise<Deferred<Integer>> getAttributeWithProviderRuntimeException() {
    Deferred<Integer> deferred = new Deferred<Integer>();
    ProviderRuntimeException error = new ProviderRuntimeException(MESSAGE_PROVIDERRUNTIMEEXCEPTION);
    deferred.reject(error);
    return new Promise<Deferred<Integer>>(deferred);
}
Also used : Promise(io.joynr.provider.Promise) Deferred(io.joynr.provider.Deferred) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException)

Aggregations

Deferred (io.joynr.provider.Deferred)6 Promise (io.joynr.provider.Promise)4 Method (java.lang.reflect.Method)3 ProviderRuntimeException (joynr.exceptions.ProviderRuntimeException)3 Before (org.junit.Before)3 AbstractModule (com.google.inject.AbstractModule)2 TypeLiteral (com.google.inject.TypeLiteral)2 JoynrPropertiesModule (io.joynr.common.JoynrPropertiesModule)2 RequestCallerFactory (io.joynr.dispatching.RequestCallerFactory)2 JsonMessageSerializerModule (io.joynr.messaging.JsonMessageSerializerModule)2 DeferredVoid (io.joynr.provider.DeferredVoid)2 ProviderContainer (io.joynr.provider.ProviderContainer)2 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)2 Request (joynr.Request)2 Injector (com.google.inject.Injector)1 Module (com.google.inject.Module)1 Multibinder (com.google.inject.multibindings.Multibinder)1 JoynrMessageScopeModule (io.joynr.context.JoynrMessageScopeModule)1 MultiReturnValuesContainer (io.joynr.dispatcher.rpc.MultiReturnValuesContainer)1 RequestCaller (io.joynr.dispatching.RequestCaller)1