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 voidclose()intgenerateOperationId()intgenerateRequestId(TOMMessageType type)CommunicationSystemClientSidegetCommunicationSystem()intgetProcessId()intgetReplyQuorum()Retrieves the required quorum size for the amount of repliesintgetSession()ClientViewControllergetViewManager()voidsendMessageToTargets(byte[] m, int reqId, int operationId, int[] targets, TOMMessageType type)voidTOMulticast(byte[] m, int reqId, int operationId, TOMMessageType reqType)voidTOMulticast(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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein 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
-
-