Search in sources :

Example 31 with ApplicationException

use of joynr.exceptions.ApplicationException in project joynr by bmwcarit.

the class LocalDomainAccessControllerImpl method unsubscribeFromAceChanges.

@Override
public void unsubscribeFromAceChanges(String domain, String interfaceName) {
    UserDomainInterfaceOperationKey subscriptionKey = new UserDomainInterfaceOperationKey(null, domain, interfaceName, null);
    AceSubscription subscriptions = subscriptionsMap.get(subscriptionKey);
    if (subscriptions != null) {
        try {
            globalDomainAccessControllerClient.unsubscribeFromMasterAccessControlEntryChangedBroadcast(subscriptions.getMasterSubscriptionId());
            globalDomainAccessControllerClient.unsubscribeFromMediatorAccessControlEntryChangedBroadcast(subscriptions.getMediatorSubscriptionId());
            globalDomainAccessControllerClient.unsubscribeFromOwnerAccessControlEntryChangedBroadcast(subscriptions.getOwnerSubscriptionId());
        } catch (JoynrRuntimeException | InterruptedException | ApplicationException e) {
            LOG.warn("unsubscribe from AceChanges failed due to the following error: {}", e.getMessage());
            return;
        }
    } else {
        /*
             * This can be the case, when no consumer request has been performed during the lifetime of the provider
             */
        LOG.debug("Subscription for ace subscription for interface '{}' domain '{}' not found", interfaceName, domain);
    }
}
Also used : ApplicationException(joynr.exceptions.ApplicationException) UserDomainInterfaceOperationKey(io.joynr.accesscontrol.primarykey.UserDomainInterfaceOperationKey) JoynrRuntimeException(io.joynr.exceptions.JoynrRuntimeException)

Aggregations

ApplicationException (joynr.exceptions.ApplicationException)31 Test (org.junit.Test)21 JoynrRuntimeException (io.joynr.exceptions.JoynrRuntimeException)13 ProviderRuntimeException (joynr.exceptions.ProviderRuntimeException)13 joynr.tests.testProxy (joynr.tests.testProxy)7 MapStringString (joynr.interlanguagetest.namedTypeCollection2.MapStringString)6 Reply (joynr.Reply)5 DeferredVoid (io.joynr.provider.DeferredVoid)4 DiscoveryException (io.joynr.exceptions.DiscoveryException)3 JoynrException (io.joynr.exceptions.JoynrException)3 JoynrIllegalStateException (io.joynr.exceptions.JoynrIllegalStateException)3 CheckForNull (javax.annotation.CheckForNull)3 DiscoveryQos (io.joynr.arbitration.DiscoveryQos)2 SynchronizedReplyCaller (io.joynr.dispatching.rpc.SynchronizedReplyCaller)2 MessagingQos (io.joynr.messaging.MessagingQos)2 IOException (java.io.IOException)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 Method (java.lang.reflect.Method)2 MulticastSubscriptionQos (joynr.MulticastSubscriptionQos)2 Ignore (org.junit.Ignore)2