Class Recipient
-
- All Implemented Interfaces:
public final class RecipientA recipient of a notification, which is either a user or an object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRecipient.VisitorAn interface that defines how to map each variant of Recipient to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<User>user()A /concepts/users represents an individual in your system who can receive notifications through Knock. final Optional<Object>object_()A custom /concepts/objects entity which belongs to a collection. final BooleanisUser()final BooleanisObject()final UserasUser()A /concepts/users represents an individual in your system who can receive notifications through Knock. final ObjectasObject()A custom /concepts/objects entity which belongs to a collection. final Optional<JsonValue>_json()final <T extends Any> Taccept(Recipient.Visitor<T> visitor)final Recipientvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RecipientofUser(User user)A /concepts/users represents an individual in your system who can receive notifications through Knock. final static RecipientofObject(Object object_)A custom /concepts/objects entity which belongs to a collection. -
-
Method Detail
-
user
final Optional<User> user()
A /concepts/users represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
-
object_
final Optional<Object> object_()
A custom /concepts/objects entity which belongs to a collection.
-
asUser
final User asUser()
A /concepts/users represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
-
accept
final <T extends Any> T accept(Recipient.Visitor<T> visitor)
-
ofUser
final static Recipient ofUser(User user)
A /concepts/users represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
-
-
-
-