service.broadcast
Class ReliableBroadcastService
java.lang.Object
service.Service
service.broadcast.ReliableBroadcastService
- All Implemented Interfaces:
- IBroadcast
public class ReliableBroadcastService
- extends Service
- implements IBroadcast
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
idService
protected IIdentification idService
ReliableBroadcastService
public ReliableBroadcastService()
setIdentificationService
public void setIdentificationService(IIdentification idService)
broadcast
public void broadcast(java.lang.Object data)
throws CommunicationException
- Description copied from interface:
IBroadcast
- Broadcast data to all processes of the system.
- Specified by:
broadcast
in interface IBroadcast
- Parameters:
data
- the data to be sent
- Throws:
CommunicationException
- in case of problem
synchDeliver
public Message synchDeliver()
- Description copied from interface:
IBroadcast
- Deliver synchronously the last available received message. If no message is available,
wait for the next one.
- Specified by:
synchDeliver
in interface IBroadcast
- Returns:
- the last received message
asynchDeliver
public Message asynchDeliver()
- Description copied from interface:
IBroadcast
- Deliver asynchronously the last available received message. If no message is available,
return
null
immediatly.
- Specified by:
asynchDeliver
in interface IBroadcast
- Returns:
- the last received message or
null
if none
availableMessage
public boolean availableMessage()
- Specified by:
availableMessage
in interface IBroadcast
- Returns:
true
if one received message is available, false
otherwise