Package jetbrains.buildServer.push
Class SecuredMessage
- java.lang.Object
-
- jetbrains.buildServer.push.SecuredMessage
-
- All Implemented Interfaces:
TopicMessage
public class SecuredMessage extends Object implements TopicMessage
-
-
Constructor Summary
Constructors Constructor Description SecuredMessage(TopicMessage delegate, Predicate<SUser> permissionsChecker)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Predicate<SUser>
canViewProject(String projectId)
String
serialize(Subscription subscription)
This method is invoked multiple times - for each subscription of the topic.String
toString()
-
-
-
Constructor Detail
-
SecuredMessage
public SecuredMessage(@NotNull TopicMessage delegate, @NotNull Predicate<SUser> permissionsChecker)
-
-
Method Detail
-
serialize
@Nullable public String serialize(@NotNull Subscription subscription)
Description copied from interface:TopicMessage
This method is invoked multiple times - for each subscription of the topic. Invocation for subscription is performed when security context contains the user corresponding to this subscription (seeSubscription.getUser()
. So implementations can serialize message differently depending on the user who will receive this message. If null is returned, then message will not be pushed to the corresponding subscription.- Specified by:
serialize
in interfaceTopicMessage
-
-