|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.InfoServiceDistributor
public class InfoServiceDistributor
This is the implementation of the forwarding code. Every information which to send to the other infoservices is processed by this class.
Field Summary | |
---|---|
private java.util.Vector |
m_defaultJobQueue
Stores all jobs we have to send to the other infoservices. |
private java.util.Vector |
m_initialNeighboursJobQueue
Stores all jobs we have to send to the initial neighbours of our infoservice. |
private static InfoServiceDistributor |
ms_isdInstance
Stores the instance of InfoServiceDatabase (Singleton). |
private static long |
TIMEOUT_QUEUE
|
Constructor Summary | |
---|---|
private |
InfoServiceDistributor()
Creates a new instance of an InfoServiceDistributor. |
Method Summary | |
---|---|
void |
addJob(IDistributable a_newJob)
Adds a new job to the default job queue. |
void |
addJobToInititalNeighboursQueue(IDistributable a_newJob)
Adds a new job to the initial neighbours job queue. |
static InfoServiceDistributor |
getInstance()
Returns the instance of InfoServiceDistributor (Singleton). |
private java.util.Vector |
getNeighbourList()
Creates a list of all known infoservices (from the InfoServiceDatabase), which are neighbours of our one. |
private boolean |
sendToInfoService(InfoServiceDBEntry a_infoservice,
IDistributable a_information)
Sends the information about the DatabaseEntry to a remote infoservice. |
private boolean |
sendToInterface(ListenerInterface a_listener,
IDistributable a_information)
Sends the information to listener (remote ListenerInterface). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long TIMEOUT_QUEUE
private static InfoServiceDistributor ms_isdInstance
private java.util.Vector m_defaultJobQueue
private java.util.Vector m_initialNeighboursJobQueue
Constructor Detail |
---|
private InfoServiceDistributor()
Method Detail |
---|
public static InfoServiceDistributor getInstance()
public void addJob(IDistributable a_newJob)
addJob
in interface IDistributor
a_newJob
- The information to forward.public void addJobToInititalNeighboursQueue(IDistributable a_newJob)
a_newJob
- The information to forward.private java.util.Vector getNeighbourList()
private boolean sendToInfoService(InfoServiceDBEntry a_infoservice, IDistributable a_information)
a_infoservice
- The remote infoservice.a_information
- The information to send to the infoservice.
private boolean sendToInterface(ListenerInterface a_listener, IDistributable a_information)
a_listener
- The representation of a host address and port to send to.a_information
- The information to send to the listener interface.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |