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

com.harium.etyl.loader.async.AsyncResourceNotifier Maven / Gradle / Ivy

There is a newer version: 1.10.0.1
Show newest version
package com.harium.etyl.loader.async;

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

import com.harium.etyl.loader.LoadListener;

public abstract class AsyncResourceNotifier implements AsyncResource {

    private List listeners;

    protected void notifyListeners() {
        if (listeners != null && listeners.isEmpty()) {
            for (LoadListener listener : listeners) {
                listener.onLoad();
            }
        }
    }

    public void addLoadListener(LoadListener loadListener) {
        if (listeners == null) {
            listeners = new ArrayList<>();
        }
        listeners.add(loadListener);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy