Search in sources :

Example 1 with LdacDomainRoleEntryChangedBroadcastListener

use of io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener in project joynr by bmwcarit.

the class LocalDomainAccessControllerImpl method subscribeForDreChange.

private void subscribeForDreChange(String userId) {
    long wsbExpiryDate = System.currentTimeMillis() + QOS_DURATION_MS;
    MulticastSubscriptionQos broadcastSubscriptionQos = new MulticastSubscriptionQos();
    broadcastSubscriptionQos.setExpiryDateMs(wsbExpiryDate);
    globalDomainAccessControllerClient.subscribeToDomainRoleEntryChangedBroadcast(new LdacDomainRoleEntryChangedBroadcastListener(localDomainAccessStore), broadcastSubscriptionQos, sanitiseForPartition(userId));
}
Also used : LdacDomainRoleEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener) MulticastSubscriptionQos(joynr.MulticastSubscriptionQos)

Example 2 with LdacDomainRoleEntryChangedBroadcastListener

use of io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener in project joynr by bmwcarit.

the class GdacBroadcastListenerTest method testDreChangedListenerForRemoveDre.

@Test
public void testDreChangedListenerForRemoveDre() {
    LdacDomainRoleEntryChangedBroadcastListener dreChangedListener = new LdacDomainRoleEntryChangedBroadcastListener(domainAccessControlStore);
    dreChangedListener.onReceive(ChangeType.REMOVE, userDre);
    verify(domainAccessControlStore).removeDomainRole(eq(userDre.getUid()), eq(userDre.getRole()));
}
Also used : LdacDomainRoleEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener) Test(org.junit.Test)

Example 3 with LdacDomainRoleEntryChangedBroadcastListener

use of io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener in project joynr by bmwcarit.

the class GdacBroadcastListenerTest method testDreChangedListenerForUpdateDre.

@Test
public void testDreChangedListenerForUpdateDre() {
    LdacDomainRoleEntryChangedBroadcastListener dreChangedListener = new LdacDomainRoleEntryChangedBroadcastListener(domainAccessControlStore);
    dreChangedListener.onReceive(ChangeType.UPDATE, userDre);
    verify(domainAccessControlStore).updateDomainRole(eq(userDre));
}
Also used : LdacDomainRoleEntryChangedBroadcastListener(io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener) Test(org.junit.Test)

Aggregations

LdacDomainRoleEntryChangedBroadcastListener (io.joynr.accesscontrol.broadcastlistener.LdacDomainRoleEntryChangedBroadcastListener)3 Test (org.junit.Test)2 MulticastSubscriptionQos (joynr.MulticastSubscriptionQos)1