Search in sources :

Example 1 with GlobalDomainRoleControllerProxy

use of joynr.infrastructure.GlobalDomainRoleControllerProxy in project joynr by bmwcarit.

the class AccessControllerEnd2EndTest method sendProvisionedEntriesToGDAC.

private void sendProvisionedEntriesToGDAC(List<DomainRoleEntry> domainRoleEntries, List<MasterAccessControlEntry> masterAccessControlEntries, List<MasterAccessControlEntry> mediatorAccessControlEntries, List<OwnerAccessControlEntry> ownerAccessControlEntries) {
    DiscoveryQos discoveryQos = new DiscoveryQos();
    discoveryQos.setDiscoveryScope(DiscoveryScope.GLOBAL_ONLY);
    discoveryQos.setArbitrationStrategy(ArbitrationStrategy.HighestPriority);
    discoveryQos.setDiscoveryTimeoutMs(DISCOVERY_TIMEOUT);
    MessagingQos messagingQos = new MessagingQos();
    messagingQos.setTtl_ms(MESSAGING_TTL);
    GlobalDomainAccessControlListEditorProxy gdacListEditorProxy = runtime.getProxyBuilder(GDAC_DOMAIN, GlobalDomainAccessControlListEditorProxy.class).setDiscoveryQos(discoveryQos).setMessagingQos(messagingQos).build();
    GlobalDomainRoleControllerProxy gdrcProxy = runtime.getProxyBuilder(GDAC_DOMAIN, GlobalDomainRoleControllerProxy.class).setDiscoveryQos(discoveryQos).setMessagingQos(messagingQos).build();
    for (DomainRoleEntry entry : domainRoleEntries) {
        assertTrue(gdrcProxy.updateDomainRole(entry));
    }
    for (MasterAccessControlEntry entry : masterAccessControlEntries) {
        assertTrue(gdacListEditorProxy.updateMasterAccessControlEntry(entry));
    }
    for (MasterAccessControlEntry entry : mediatorAccessControlEntries) {
        assertTrue(gdacListEditorProxy.updateMediatorAccessControlEntry(entry));
    }
    for (OwnerAccessControlEntry entry : ownerAccessControlEntries) {
        assertTrue(gdacListEditorProxy.updateOwnerAccessControlEntry(entry));
    }
}
Also used : MessagingQos(io.joynr.messaging.MessagingQos) GlobalDomainAccessControlListEditorProxy(joynr.infrastructure.GlobalDomainAccessControlListEditorProxy) MasterAccessControlEntry(joynr.infrastructure.DacTypes.MasterAccessControlEntry) OwnerAccessControlEntry(joynr.infrastructure.DacTypes.OwnerAccessControlEntry) DomainRoleEntry(joynr.infrastructure.DacTypes.DomainRoleEntry) GlobalDomainRoleControllerProxy(joynr.infrastructure.GlobalDomainRoleControllerProxy) DiscoveryQos(io.joynr.arbitration.DiscoveryQos)

Example 2 with GlobalDomainRoleControllerProxy

use of joynr.infrastructure.GlobalDomainRoleControllerProxy in project joynr by bmwcarit.

the class GlobalDomainAccessControllerClient method getGlobalDomainRoleControllerProxy.

private GlobalDomainRoleControllerProxy getGlobalDomainRoleControllerProxy(long ttl) {
    ProxyBuilder<GlobalDomainRoleControllerProxy> roleControlProxyBuilder = proxyBuilderFactory.get(domain, GlobalDomainRoleControllerProxy.class);
    DiscoveryQos discoveryQos = new DiscoveryQos();
    discoveryQos.setDiscoveryScope(DiscoveryScope.GLOBAL_ONLY);
    discoveryQos.setCacheMaxAgeMs(DiscoveryQos.NO_MAX_AGE);
    MessagingQos messagingQos = new MessagingQos(ttl);
    return roleControlProxyBuilder.setDiscoveryQos(discoveryQos).setMessagingQos(messagingQos).build();
}
Also used : MessagingQos(io.joynr.messaging.MessagingQos) GlobalDomainRoleControllerProxy(joynr.infrastructure.GlobalDomainRoleControllerProxy) DiscoveryQos(io.joynr.arbitration.DiscoveryQos)

Aggregations

DiscoveryQos (io.joynr.arbitration.DiscoveryQos)2 MessagingQos (io.joynr.messaging.MessagingQos)2 GlobalDomainRoleControllerProxy (joynr.infrastructure.GlobalDomainRoleControllerProxy)2 DomainRoleEntry (joynr.infrastructure.DacTypes.DomainRoleEntry)1 MasterAccessControlEntry (joynr.infrastructure.DacTypes.MasterAccessControlEntry)1 OwnerAccessControlEntry (joynr.infrastructure.DacTypes.OwnerAccessControlEntry)1 GlobalDomainAccessControlListEditorProxy (joynr.infrastructure.GlobalDomainAccessControlListEditorProxy)1