Search in sources :

Example 1 with LdacMasterAccessControlEntryChangedBroadcastListener

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));
}
Also used : LdacMasterAccessControlEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacMasterAccessControlEntryChangedBroadcastListener) Test(org.junit.Test)

Example 2 with LdacMasterAccessControlEntryChangedBroadcastListener

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);
}
Also used : LdacOwnerAccessControlEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacOwnerAccessControlEntryChangedBroadcastListener) LdacMasterAccessControlEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacMasterAccessControlEntryChangedBroadcastListener) LdacMediatorAccessControlEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacMediatorAccessControlEntryChangedBroadcastListener) MulticastSubscriptionQos(joynr.MulticastSubscriptionQos)

Example 3 with LdacMasterAccessControlEntryChangedBroadcastListener

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());
}
Also used : LdacMasterAccessControlEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacMasterAccessControlEntryChangedBroadcastListener) Test(org.junit.Test)

Aggregations

LdacMasterAccessControlEntryChangedBroadcastListener (io.joynr.accesscontrol.broadcastlistener.LdacMasterAccessControlEntryChangedBroadcastListener)3 Test (org.junit.Test)2 LdacMediatorAccessControlEntryChangedBroadcastListener (io.joynr.accesscontrol.broadcastlistener.LdacMediatorAccessControlEntryChangedBroadcastListener)1 LdacOwnerAccessControlEntryChangedBroadcastListener (io.joynr.accesscontrol.broadcastlistener.LdacOwnerAccessControlEntryChangedBroadcastListener)1 MulticastSubscriptionQos (joynr.MulticastSubscriptionQos)1