Interface ModifiableDefaultPermissions
public interface ModifiableDefaultPermissions
Default permissions enable the authorization of PUBLISH/Subscriptions if no
Authorizer is used.
The default permissions can be different for each client.
- Since:
- 4.0.0, CE 2019.1
-
Method Summary
Modifier and Type Method Description voidadd(@NotNull TopicPermission permission)Adds aTopicPermissionto the default permissions for this client.voidaddAll(@NotNull Collection<? extends TopicPermission> permissions)Adds all passedTopicPermissions to the default permissions for this client.@Immutable @NotNull List<@NotNull TopicPermission>asList()All default permissions for this client.voidclear()Removes allTopicPermissionfor this client.@NotNull DefaultAuthorizationBehaviourgetDefaultBehaviour()The default behaviour that is used when none of the default permissions matches a PUBLISH topic or a topic filter from a Subscription.voidremove(@NotNull TopicPermission permission)Removes a specificTopicPermissionfrom the default permission for this client.voidsetDefaultBehaviour(@NotNull DefaultAuthorizationBehaviour defaultBehaviour)Overrides the default behaviour that is used when none of the default permissions matches a PUBLISH topic or a topic filter from a Subscription.
-
Method Details
-
asList
All default permissions for this client.- Returns:
- An immutable
Listwith all default permissions for this client. - Since:
- 4.0.0, CE 2019.1
-
add
Adds aTopicPermissionto the default permissions for this client.- Parameters:
permission- TheTopicPermissionto add.- Throws:
DoNotImplementException- IfTopicPermissionis implemented by the extension and not created byBuilders.topicPermission().- Since:
- 4.0.0, CE 2019.1
-
addAll
Adds all passedTopicPermissions to the default permissions for this client.- Parameters:
permissions- ACollectionofTopicPermissions to add.- Throws:
NullPointerException- If permissions is null.DoNotImplementException- IfTopicPermissionis implemented by the extension and not created byBuilders.topicPermission().- Since:
- 4.0.0, CE 2019.1
-
remove
Removes a specificTopicPermissionfrom the default permission for this client.- Parameters:
permission- TheTopicPermissionto remove.- Throws:
DoNotImplementException- IfTopicPermissionis implemented by the extension and not created byBuilders.topicPermission().- Since:
- 4.0.0, CE 2019.1
-
clear
void clear()Removes allTopicPermissionfor this client.- Since:
- 4.0.0, CE 2019.1
-
getDefaultBehaviour
The default behaviour that is used when none of the default permissions matches a PUBLISH topic or a topic filter from a Subscription.- Returns:
- The current
DefaultAuthorizationBehaviour. - Since:
- 4.0.0, CE 2019.1
-
setDefaultBehaviour
Overrides the default behaviour that is used when none of the default permissions matches a PUBLISH topic or a topic filter from a Subscription.Defaults to
DefaultAuthorizationBehaviour.ALLOWif no permissions are added, defaults toDefaultAuthorizationBehaviour.DENYif permissions are added.If the value is overridden with this method, the value does not change automatically on
add(TopicPermission)oraddAll(Collection).- Parameters:
defaultBehaviour- The default behaviour to use.- Since:
- 4.0.0, CE 2019.1
-