Interface PushNotificationDelegate

    • Method Detail

      • startServices

        void startServices()
                    throws PushNotificationException
        Starts any required services for this delegate. This may include e.g. listeners to specific ports. This method is called once after a new delegate is generated, but before it is made available for general use by the PushNotificationService.
        Throws:
        PushNotificationException - if there were any issues starting the service.
      • send

        void send​(PushMessage message)
        Used to send a message out to the PushNotificationDelegate to be delivered.
        Parameters:
        message - The message to send.
      • isRequireNewDelegate

        boolean isRequireNewDelegate​(PushNotificationServiceConfig newConfig)
        Returns whether or not the new config is so different from the old that the existing delegate should be removed from the pool.
        Parameters:
        newConfig - The new configuration to check against the old.
        Returns:
        True if the configuration change requires the PushNotificationService to instantiate a new instance of this delegate.
      • updateDelegate

        void updateDelegate​(PushNotificationServiceConfig newConfig)
        Updates the existing delegate's config. Implementors must not alter the connection parameters of the delegate, but may alter extraneous information such as values added to static fields in the delegate's communicated messages.
        Parameters:
        newConfig - The new config from which to update the existing delegate.
      • getRegServiceLocation

        String getRegServiceLocation()
        Returns the (public, relative) registration service location of this delegate - if appropriate. Otherwise returns null.
        Returns:
        The (public, relative) service location of this delegate as exposed to the world, may be relative to the OpenAM server instance ID {@see WebtopNaming}.
      • getAuthServiceLocation

        String getAuthServiceLocation()
        Returns the (public, relative) authentication service location of this delegate - if appropriate. Otherwise returns null.
        Returns:
        The (public, relative) service location of this delegate as exposed to the world, may be relative to the OpenAM server instance ID {@see WebtopNaming}.
      • getRegistrationMessagePredicates

        Set<Predicate> getRegistrationMessagePredicates()
        Returns a set of registration message predicates required by this delegate. Must return an empty set if there are no predicates to be run.
        Returns:
        A set of predicate delegates.
      • getAuthenticationMessagePredicates

        Set<Predicate> getAuthenticationMessagePredicates()
        Returns a set of authentication message predicates required by this delegate. Must return an empty set if there are no predicates to be run.
        Returns:
        A set of predicate delegates.
      • getMessageDispatcher

        MessageDispatcher getMessageDispatcher()
        Returns the MessageDispatcher for this delegate. Used to get messages back to the originator when returned through a different medium.
        Returns:
        The MessageDispatcher for this delegate.