Class SnsRegistrationPredicate

  • All Implemented Interfaces:
    Predicate

    public class SnsRegistrationPredicate
    extends AbstractPredicate
    Acts to register (via communication with SNS) the device that is currently talking to the server from the mobile app. org.forgerock.openam.authentication.modules.push.registration.AuthenticatorPushRegistration for information on the format which the perform() method alters the data to fit. This predicate does NOT have a listener attached to its config reading subsystem, therefore it will use the values from the config at the point of time the message creates this class.
    • Constructor Detail

      • SnsRegistrationPredicate

        public SnsRegistrationPredicate​(String realm)
        Generate a new SnsRegistrationPredicate, which will use the supplied realm to read the config to gather the information necessary to communicate with SNS.
        Parameters:
        realm - The realm in which this predicate exists.
      • SnsRegistrationPredicate

        public SnsRegistrationPredicate()
        Default constructor for the SnsRegistrationPredicate, used for serialization and deserialization purposes.
    • Method Detail

      • perform

        public boolean perform​(org.forgerock.json.JsonValue content)
        Communicates with Amazon to ensure that the device communicating with us is registered with Amazon, and to retrieve the appropriate endpoint ARN which will later be used to communicate with this device. Finally, expands the contents out to be readable by the registration module itself, including the communicationId. Execute the predicate against the given Json content and return the predicate's success/failure.
        Parameters:
        content - against which the predicate can be performed.
        Returns:
        whether the predicate passed or not.
      • setRealm

        public void setRealm​(String realm)
        Sets the realm for this predicate. Used when deserilialized from the CTS.
        Parameters:
        realm - The location for this predicate.