Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
de-push-proxy-plugin / src / android / DEPushNotificationHandlerRegistry.java
Size: Mime:
package com.vipera.pushproxy;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by marcobonati on 22/05/2017.
 */

public class DEPushNotificationHandlerRegistry {

    private static DEPushNotificationHandlerRegistry _instance;
    private List<DEPushNotificationHandler> handlers = null;

    private DEPushNotificationHandlerRegistry(){
        handlers = new ArrayList<DEPushNotificationHandler>();
    }

    public static DEPushNotificationHandlerRegistry getInstance(){
        if (_instance==null){
            _instance = new DEPushNotificationHandlerRegistry();
        }
        return _instance;
    }

    public void registerNotificationHandler(DEPushNotificationHandler handler){
        this.handlers.add(handler);
    }

    public void unregisterNotificationHandler(DEPushNotificationHandler handler){
        this.handlers.remove(handler);
    }

    public List<DEPushNotificationHandler> getHandlers(){
        return this.handlers;
    }

}