Repository URL to install this package:
|
Version:
1.0.1 ▾
|
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;
}
}