package com.rdlze.radializebase.interfaces; import java.io.Serializable; import java.rmi.Remote; import java.rmi.RemoteException; import java.sql.SQLException; import java.util.List; import com.rdlze.radializeutils.objects.Radio; public interface InterfaceCrawlerMaster extends Remote, Serializable { /** * Adds a slave node for the list of available slaves for crawling. * * @param slave * @throws RemoteException */ public void addSlave(String slaveIP, String slaveName, int port) throws RemoteException; /** * Check if metadata has changed for the given radio. If so, new media is * mapped on the master for that radioId. * * @param radioId * @param media * @return */ public boolean hasChanged(int radioId, String media) throws RemoteException; /** * Adds to the crawling queue radios os the given companies. * * @param commaSeparatedCompanyIds * ex: "4,6,61" * @throws SQLException */ public boolean loadCompaniesRadios(String commaSeparatedCompanyIds) throws SQLException, RemoteException; /** * Adds to the crawling queue a list of radios * * @param radios * list of radios */ public boolean addRadiosToCrawl(List radios) throws RemoteException; /** * Only tester if was connected. * * @throws RemoteException */ public void connected() throws RemoteException; /** * Tells the master a radio's metadata is not able to be crawled by stream * so the master can send it to be collected by metadata pages(traditional crawling). * @param idRadio * @throws RemoteException */ public void fail2CollectByStream(int idRadio) throws RemoteException; /** * Allows the external program to ask for a list of * radios to be crawled. * @param numRadios is how many radios should be sent on response * @param slaveName to identify which slave is asking and how to populate the response * @throws RemoteException */ public void getRadios2Crawl(int numRadios, String slaveName) throws RemoteException; }