package de.thedevstack.conversationsplus.services.filetransfer; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import de.thedevstack.conversationsplus.services.FileTransferService; /** * */ public abstract class AbstractFileTransferService implements FileTransferService { private List statusListeners = new ArrayList<>(); @Override public void addFileTransferStatusListener(FileTransferStatusListener... listeners) { this.statusListeners.addAll(Arrays.asList(listeners)); } protected void addStatusListenerToEntity(FileTransferEntity entity) { entity.addFileTransferStatusListener(this.statusListeners.toArray(new FileTransferStatusListener[0])); } }