use of io.joynr.accesscontrol.broadcastlistener.LdacOwnerAccessControlEntryChangedBroadcastListener in project joynr by bmwcarit.
the class GdacBroadcastListenerTest method testOnwerAceChangedListenerForUpdateAce.
@Test
public void testOnwerAceChangedListenerForUpdateAce() {
LdacOwnerAccessControlEntryChangedBroadcastListener dreChangedListener = new LdacOwnerAccessControlEntryChangedBroadcastListener(domainAccessControlStore);
dreChangedListener.onReceive(ChangeType.UPDATE, ownerAce);
verify(domainAccessControlStore).updateOwnerAccessControlEntry(eq(ownerAce));
}
use of io.joynr.accesscontrol.broadcastlistener.LdacOwnerAccessControlEntryChangedBroadcastListener in project joynr by bmwcarit.
the class LocalDomainAccessControllerImpl method subscribeForAceChange.
private AceSubscription subscribeForAceChange(String domain, String interfaceName) {
long wsbExpiryDate = System.currentTimeMillis() + QOS_DURATION_MS;
MulticastSubscriptionQos broadcastSubscriptionQos = new MulticastSubscriptionQos();
broadcastSubscriptionQos.setExpiryDateMs(wsbExpiryDate);
Future<String> mastersubscriptionId = globalDomainAccessControllerClient.subscribeToMasterAccessControlEntryChangedBroadcast(new LdacMasterAccessControlEntryChangedBroadcastListener(localDomainAccessStore), broadcastSubscriptionQos, SINGLE_LEVEL_WILDCARD, sanitiseForPartition(domain), sanitiseForPartition(interfaceName));
Future<String> mediatorsubscriptionId = globalDomainAccessControllerClient.subscribeToMediatorAccessControlEntryChangedBroadcast(new LdacMediatorAccessControlEntryChangedBroadcastListener(localDomainAccessStore), broadcastSubscriptionQos, SINGLE_LEVEL_WILDCARD, sanitiseForPartition(domain), sanitiseForPartition(interfaceName));
Future<String> ownersubscriptionId = globalDomainAccessControllerClient.subscribeToOwnerAccessControlEntryChangedBroadcast(new LdacOwnerAccessControlEntryChangedBroadcastListener(localDomainAccessStore), broadcastSubscriptionQos, SINGLE_LEVEL_WILDCARD, sanitiseForPartition(domain), sanitiseForPartition(interfaceName));
return new AceSubscription(mastersubscriptionId, mediatorsubscriptionId, ownersubscriptionId);
}
use of io.joynr.accesscontrol.broadcastlistener.LdacOwnerAccessControlEntryChangedBroadcastListener in project joynr by bmwcarit.
the class GdacBroadcastListenerTest method testOnwerAceChangedListenerForRemoveAce.
@Test
public void testOnwerAceChangedListenerForRemoveAce() {
LdacOwnerAccessControlEntryChangedBroadcastListener dreChangedListener = new LdacOwnerAccessControlEntryChangedBroadcastListener(domainAccessControlStore);
dreChangedListener.onReceive(ChangeType.REMOVE, ownerAce);
verify(domainAccessControlStore).removeOwnerAccessControlEntry(ownerAce.getUid(), ownerAce.getDomain(), ownerAce.getInterfaceName(), ownerAce.getOperation());
}
Aggregations