Class Recipient

  • All Implemented Interfaces:

    
    public final class Recipient
    
                        

    A recipient of a notification, which is either a user or an object.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface Recipient.Visitor

      An interface that defines how to map each variant of Recipient to a value of type T.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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.

      • asObject

         final Object asObject()

        A custom /concepts/objects entity which belongs to a collection.

      • 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.

      • ofObject

         final static Recipient ofObject(Object object_)

        A custom /concepts/objects entity which belongs to a collection.