use of io.joynr.accesscontrol.broadcastlistener.LdacMasterAccessControlEntryChangedBroadcastListener in project joynr by bmwcarit.
the class GdacBroadcastListenerTest method testMasterAceChangedListenerForUpdateAce.
@Test
public void testMasterAceChangedListenerForUpdateAce() {
LdacMasterAccessControlEntryChangedBroadcastListener dreChangedListener = new LdacMasterAccessControlEntryChangedBroadcastListener(domainAccessControlStore);
dreChangedListener.onReceive(ChangeType.UPDATE, masterAce);
verify(domainAccessControlStore).updateMasterAccessControlEntry(eq(masterAce));
}
use of io.joynr.accesscontrol.broadcastlistener.LdacMasterAccessControlEntryChangedBroadcastListener 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.LdacMasterAccessControlEntryChangedBroadcastListener in project joynr by bmwcarit.
the class GdacBroadcastListenerTest method testMasterAceChangedListenerForRemoveAce.
@Test
public void testMasterAceChangedListenerForRemoveAce() {
LdacMasterAccessControlEntryChangedBroadcastListener dreChangedListener = new LdacMasterAccessControlEntryChangedBroadcastListener(domainAccessControlStore);
dreChangedListener.onReceive(ChangeType.REMOVE, masterAce);
verify(domainAccessControlStore).removeMasterAccessControlEntry(masterAce.getUid(), masterAce.getDomain(), masterAce.getInterfaceName(), masterAce.getOperation());
}
Aggregations