Interface ModifiableDefaultPermissions
-
public interface ModifiableDefaultPermissionsDefault permissions enable the authorization of PUBLISH/Subscriptions if noAuthorizeris used.The default permissions can be different for each client.
- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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 Detail
-
asList
@Immutable @NotNull @Immutable @NotNull List<@NotNull TopicPermission> 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
void add(@NotNull TopicPermission permission)
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
void addAll(@NotNull Collection<? extends TopicPermission> permissions)
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
void remove(@NotNull TopicPermission permission)
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
@NotNull DefaultAuthorizationBehaviour 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
void setDefaultBehaviour(@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.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
-
-