use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class RoutingProviderImpl method resolvedDeferred.
private Promise<DeferredVoid> resolvedDeferred() {
final DeferredVoid deferred = new DeferredVoid();
deferred.resolve();
return new Promise<>(deferred);
}
use of io.joynr.provider.Promise 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);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class GlobalDomainAccessControlListEditorProviderImpl method removeOwnerAccessControlEntry.
@Override
public Promise<RemoveOwnerAccessControlEntryDeferred> removeOwnerAccessControlEntry(String uid, String domain, String interfaceName, String operation) {
RemoveOwnerAccessControlEntryDeferred deferred = new RemoveOwnerAccessControlEntryDeferred();
boolean removeSuccess = domainAccessStore.removeOwnerAccessControlEntry(uid, domain, interfaceName, operation);
if (removeSuccess) {
OwnerAccessControlEntry removedEntry = new OwnerAccessControlEntry(uid, domain, interfaceName, null, null, operation, null);
domainAccessControllerProvider.fireOwnerAccessControlEntryChanged(ChangeType.REMOVE, removedEntry);
}
deferred.resolve(removeSuccess);
return new Promise<RemoveOwnerAccessControlEntryDeferred>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class GlobalDomainAccessControlListEditorProviderImpl method removeMediatorAccessControlEntry.
@Override
public Promise<RemoveMediatorAccessControlEntryDeferred> removeMediatorAccessControlEntry(String uid, String domain, String interfaceName, String operation) {
RemoveMediatorAccessControlEntryDeferred deferred = new RemoveMediatorAccessControlEntryDeferred();
boolean removeSuccess = domainAccessStore.removeMediatorAccessControlEntry(uid, domain, interfaceName, operation);
if (removeSuccess) {
MasterAccessControlEntry removedEntry = new MasterAccessControlEntry(uid, domain, interfaceName, null, null, null, null, operation, null, null);
domainAccessControllerProvider.fireMediatorAccessControlEntryChanged(ChangeType.REMOVE, removedEntry);
}
deferred.resolve(removeSuccess);
return new Promise<RemoveMediatorAccessControlEntryDeferred>(deferred);
}
use of io.joynr.provider.Promise in project joynr by bmwcarit.
the class DummyCapabilitiesDirectory method lookup.
@Override
public Promise<Lookup2Deferred> lookup(String participantId) {
Lookup2Deferred deferred = new Lookup2Deferred();
DiscoveryEntryWithMetaInfo discoveryEntry = lookup(participantId, DiscoveryQos.NO_FILTER);
deferred.resolve(discoveryEntry);
return new Promise<Lookup2Deferred>(deferred);
}
Aggregations