All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.yawenok.fcm.client.request.FcmMulticastMessage Maven / Gradle / Ivy

The newest version!
package io.github.yawenok.fcm.client.request;

import com.alibaba.fastjson.annotation.JSONField;
import io.github.yawenok.fcm.client.options.FcmMessageOptions;

import java.util.List;

public class FcmMulticastMessage extends FcmMessage {
    private final List registrationIds;

    public FcmMulticastMessage(final FcmMessageOptions options, final List registrationIds, final Object data, final Object notification) {
        super(options, data, notification);

        if (registrationIds == null) {
            throw new IllegalArgumentException("registrationIds is null!");
        }
        if (registrationIds.size() > 1000) {
            throw new IllegalArgumentException("registrationIds is limit in 1000!");
        }

        this.registrationIds = registrationIds;
    }

    @JSONField(name = "registration_ids")
    public List getRegistrationIds() {
        return registrationIds;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy