12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package com.rdlze.radializebase.interfaces;
- import java.io.Serializable;
- import java.rmi.Remote;
- import java.rmi.RemoteException;
- import java.util.HashSet;
- import java.util.List;
- import com.rdlze.radializeutils.objects.Radio;
- public interface InterfaceCrawlerSlave extends Remote, Serializable {
- public static final int TYPE_MD_CRAWLER = 0;
- public static final int TYPE_MD_BY_STREAM_CRAWLER = 1;
- public static final int TYPE_MD_WITH_JAVA_BY_STREAM_CRAWLER = 2;
- public static final int TYPE_MD_WITH_MPLAYER_BY_STREAM_CRAWLER = 3;
-
- /**
- * Delivers a radio for the slave to crawl.
- * @param radio
- * @throws RemoteException
- */
- public void notify(Radio radio) throws RemoteException;
- /**
- * @return Name of the slave. In most case name is equals to IP.
- * @throws RemoteException
- */
- public String getName() throws RemoteException;
- /**
- * To check if slave is alive.
- * @return list of radios being crawled.
- * @throws RemoteException
- */
- public List<Integer> ping() throws RemoteException;
- /**
- * @return Actually the max radios the slave is able to crawl.
- * @throws RemoteException
- */
- public int getNumCores() throws RemoteException;
-
- /**
- * Most useful for streamslave, when the master is gonna distribute
- * radios, and the slave is reconnecting to master,
- * having radios already being crawled. So the master will check if more radios are needed
- * instead of send more.
- * @return The number of radios being crawled at the moment.
- * @throws RemoteException
- */
- public HashSet<Integer> getCrawlingNow() throws RemoteException;
- /**
- * Delivers a list of radios for the slave to crawl.
- * @param toNotify
- * @throws RemoteException
- */
- public void notify(List<Radio> toNotify) throws RemoteException;
- /**
- * Defines if the slaves connect only to metadata pages
- * or monitor streams to get metadata as soon as they change
- * @return
- * @throws RemoteException
- */
- public int getCrawlerType() throws RemoteException;
-
- }
|