|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmcgui.Multicaster
public abstract class Multicaster
Class to extend when creating a multicast module
Field Summary | |
---|---|
protected BasicCommunicator |
bcom
The communication backend. |
protected int |
hosts
Initial number of hosts in network. |
protected int |
id
Id of the client. |
protected MulticasterUI |
mcui
The user interface. |
Constructor Summary | |
---|---|
Multicaster()
|
Method Summary | |
---|---|
abstract void |
basicpeerdown(int peer)
Signals that a peer is down and has been down for a while to allow for messages taking different paths from this peer to arrive. |
abstract void |
basicreceive(int peer,
Message message)
Receive a basic message |
abstract void |
cast(java.lang.String messagetext)
Multicast a message |
void |
enableUI()
Enables the user to start using the system. |
int |
getId()
Returns id of the client. |
abstract void |
init()
Method for initialization of things. |
void |
setCommunicator(BasicCommunicator bcom)
Set BasicCommunicator that should be used |
void |
setId(int id,
int hosts)
Set the id of the client |
void |
setUI(MulticasterUI mcui)
Set the UI that should be used |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int id
protected int hosts
protected MulticasterUI mcui
protected BasicCommunicator bcom
Constructor Detail |
---|
public Multicaster()
Method Detail |
---|
public int getId()
public abstract void init()
public abstract void cast(java.lang.String messagetext)
message
- The message to be multicastedpublic abstract void basicreceive(int peer, Message message)
message
- The message receivedpublic abstract void basicpeerdown(int peer)
peer
- The dead peerpublic void setId(int id, int hosts)
id
- The idpublic void setUI(MulticasterUI mcui)
mcui
- The UIpublic void setCommunicator(BasicCommunicator bcom)
bcom
- The Basic communicatorpublic void enableUI()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |