Package bftsmart.tom.core
Class TOMSender
- java.lang.Object
-
- bftsmart.tom.core.TOMSender
-
- All Implemented Interfaces:
ReplyReceiver
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
ServiceProxy
public abstract class TOMSender extends java.lang.Object implements ReplyReceiver, java.io.Closeable, java.lang.AutoCloseable
This class is used to multicast messages to replicas and receive replies.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
generateOperationId()
int
generateRequestId(TOMMessageType type)
CommunicationSystemClientSide
getCommunicationSystem()
int
getProcessId()
int
getReplyQuorum()
Retrieves the required quorum size for the amount of repliesint
getSession()
ClientViewController
getViewManager()
void
sendMessageToTargets(byte[] m, int reqId, int operationId, int[] targets, TOMMessageType type)
void
TOMulticast(byte[] m, int reqId, int operationId, TOMMessageType reqType)
void
TOMulticast(TOMMessage sm)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface bftsmart.communication.client.ReplyReceiver
replyReceived
-
-
-
-
Constructor Detail
-
TOMSender
public TOMSender(int processId, java.lang.String configHome, KeyLoader loader)
Creates a new instance of TOMulticastSender- Parameters:
processId
- Process id for this clientconfigHome
- Configuration directory for BFT-SMARTloader
- Used to load signature keys from disk
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
getCommunicationSystem
public CommunicationSystemClientSide getCommunicationSystem()
-
getViewManager
public ClientViewController getViewManager()
-
getProcessId
public int getProcessId()
-
generateRequestId
public int generateRequestId(TOMMessageType type)
-
generateOperationId
public int generateOperationId()
-
TOMulticast
public void TOMulticast(TOMMessage sm)
-
TOMulticast
public void TOMulticast(byte[] m, int reqId, int operationId, TOMMessageType reqType)
-
sendMessageToTargets
public void sendMessageToTargets(byte[] m, int reqId, int operationId, int[] targets, TOMMessageType type)
-
getSession
public int getSession()
-
getReplyQuorum
public int getReplyQuorum()
Retrieves the required quorum size for the amount of replies- Returns:
- The quorum size for the amount of replies
-
-