|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--universal.communication.Sender
To send messages via the TCP socket (in order to simulate a reliable channel). The messages send via the socket are those for the consensus and the leader election.
Field Summary | |
int |
pid
The pid of the process that is going to send messages |
java.util.Vector |
processes
List of the replicated server plus the client . |
java.util.Vector |
processesReplicas
List of the replicated servers that messages for the consensus should be send |
universal.Universal |
uni
The Universal Object that this sender is linked to. |
Constructor Summary | |
Sender(universal.Universal uni)
|
Method Summary | |
void |
s_send(universal.Message m,
java.net.InetAddress address,
int port)
Send message through Universal's socket to the specified address and port |
void |
s_send(universal.Message m,
java.util.Vector processesSend)
Sends the message m through Universal's socket to the proccesses specified in the list processesSend. |
void |
send(universal.Message m,
java.net.InetAddress address,
int port)
Send message through Universal's socket to the specified address and port |
void |
send(universal.Message m,
java.util.Vector processesSend)
Sends the message m through Universal's socket to the proccesses specified in the list processesSend. |
int |
totalno()
Returns the number of replicated server in the list processesReplicas. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.Vector processesReplicas
public java.util.Vector processes
public int pid
public universal.Universal uni
Constructor Detail |
public Sender(universal.Universal uni)
Method Detail |
public void s_send(universal.Message m, java.util.Vector processesSend)
m
- The message that we want to send.processesSend
- The list of processes this message should be sendpublic void s_send(universal.Message m, java.net.InetAddress address, int port)
public void send(universal.Message m, java.util.Vector processesSend)
m
- The message that we want to send.processesSend
- The list of processes this message should be sendpublic void send(universal.Message m, java.net.InetAddress address, int port)
public int totalno()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |