Package tigase.push.fcm
Class FcmHttpV1Provider
java.lang.Object
tigase.push.AbstractProvider
tigase.push.fcm.FcmHttpV1Provider
- All Implemented Interfaces:
tigase.kernel.beans.config.ConfigurationChangedAware,tigase.kernel.beans.Initializable,tigase.kernel.beans.UnregisterAware,IPushProvider,tigase.stats.ComponentStatisticsProvider,tigase.stats.StatisticsProviderIfc
@Bean(name="fcm-http-v1",
parent=PushNotificationsComponent.class,
active=false)
public class FcmHttpV1Provider
extends AbstractProvider
implements IPushProvider, tigase.kernel.beans.config.ConfigurationChangedAware, tigase.kernel.beans.Initializable, tigase.kernel.beans.UnregisterAware
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface tigase.push.api.IPushProvider
IPushProvider.Feature -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeanConfigurationChanged(Collection<String> collection) voidprotected CompletableFuture<AccessToken> voidpreparePayload(INotification notification) pushNotification(IPushSettings.IDevice device, INotification notification) voidprotected CompletableFuture<String> protected CompletableFuture<String> sendWithRetry(Map<String, Object> fcmNotification, int tryNo) voidsetServiceAccountContent(String serviceAccountContent) protected booleanshouldRetry(Throwable ex) Methods inherited from class tigase.push.AbstractProvider
everyHour, everyMinute, everySecond, getData, getDataMap, getName, getStatistics, pushFailed, removeData, sendingPush, setData, setUserRepository, unregisterDeviceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.stats.ComponentStatisticsProvider
belongsToMethods inherited from interface tigase.push.api.IPushProvider
getName, maxPayloadSize, supportedFeatures
-
Constructor Details
-
FcmHttpV1Provider
public FcmHttpV1Provider()
-
-
Method Details
-
beanConfigurationChanged
- Specified by:
beanConfigurationChangedin interfacetigase.kernel.beans.config.ConfigurationChangedAware
-
getDescription
- Specified by:
getDescriptionin interfaceIPushProvider
-
initialize
public void initialize()- Specified by:
initializein interfacetigase.kernel.beans.Initializable
-
beforeUnregister
public void beforeUnregister()- Specified by:
beforeUnregisterin interfacetigase.kernel.beans.UnregisterAware
-
setServiceAccountContent
public void setServiceAccountContent(String serviceAccountContent) throws tigase.db.TigaseDBException - Throws:
tigase.db.TigaseDBException
-
getCurrentAccessToken
-
pushNotification
public CompletableFuture<String> pushNotification(IPushSettings.IDevice device, INotification notification) - Specified by:
pushNotificationin interfaceIPushProvider- Parameters:
device-notification-- Returns:
- notification ID as String
-
sendWithRetry
-
shouldRetry
-
send
-
preparePayload
-
reloadSecrets
@HandleEvent(filter=remote) public void reloadSecrets(FcmHttpV1Provider.FcmSecretsChangedEvent event)
-