Sin descripción

bfbf215f17f41926c776823d369c2aeb194dd0b6.svn-base 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. package com.rdlze.radializebase.interfaces;
  2. import java.io.Serializable;
  3. import java.rmi.Remote;
  4. import java.rmi.RemoteException;
  5. import java.sql.SQLException;
  6. import java.util.List;
  7. import com.rdlze.radializeutils.objects.Radio;
  8. public interface InterfaceCrawlerMaster extends Remote, Serializable {
  9. /**
  10. * Adds a slave node for the list of available slaves for crawling.
  11. *
  12. * @param slave
  13. * @throws RemoteException
  14. */
  15. public void addSlave(String slaveIP, String slaveName, int port)
  16. throws RemoteException;
  17. /**
  18. * Check if metadata has changed for the given radio. If so, new media is
  19. * mapped on the master for that radioId.
  20. *
  21. * @param radioId
  22. * @param media
  23. * @return
  24. */
  25. public boolean hasChanged(int radioId, String media) throws RemoteException;
  26. /**
  27. * Adds to the crawling queue radios os the given companies.
  28. *
  29. * @param commaSeparatedCompanyIds
  30. * ex: "4,6,61"
  31. * @throws SQLException
  32. */
  33. public boolean loadCompaniesRadios(String commaSeparatedCompanyIds)
  34. throws SQLException, RemoteException;
  35. /**
  36. * Adds to the crawling queue a list of radios
  37. *
  38. * @param radios
  39. * list of radios
  40. */
  41. public boolean addRadiosToCrawl(List<Radio> radios) throws RemoteException;
  42. /**
  43. * Only tester if was connected.
  44. *
  45. * @throws RemoteException
  46. */
  47. public void connected() throws RemoteException;
  48. /**
  49. * Tells the master a radio's metadata is not able to be crawled by stream
  50. * so the master can send it to be collected by metadata pages(traditional crawling).
  51. * @param idRadio
  52. * @throws RemoteException
  53. */
  54. public void fail2CollectByStream(int idRadio) throws RemoteException;
  55. /**
  56. * Allows the external program to ask for a list of
  57. * radios to be crawled.
  58. * @param numRadios is how many radios should be sent on response
  59. * @param slaveName to identify which slave is asking and how to populate the response
  60. * @throws RemoteException
  61. */
  62. public void getRadios2Crawl(int numRadios, String slaveName) throws RemoteException;
  63. }