Search in sources :

Example 1 with LdacOwnerAccessControlEntryChangedBroadcastListener

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

Example 2 with LdacOwnerAccessControlEntryChangedBroadcastListener

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);
}
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 LdacOwnerAccessControlEntryChangedBroadcastListener

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

Aggregations

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