bftsmart.tom

## Class TOMSender

- java.lang.Object
- - bftsmart.tom.TOMSender

All Implemented Interfaces:
  bftsmart.communication.client.ReplyReceiver

Direct Known Subclasses:
  ServiceProxy

    public abstract class TOMSender
    extends java.lang.Object
    implements bftsmart.communication.client.ReplyReceiver

This class is used to multicast messages to replicas and receive replies.

### Constructor Summary

Constructors
Constructor and Description
`TOMSender()` Creates a new instance of TOMulticastSender TODO: This may really be empty?

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`int` `generateOperationId()`
`int` `generateRequestId(bftsmart.tom.core.messages.TOMMessageType type)`
`bftsmart.communication.client.CommunicationSystemClientSide` `getCommunicationSystem()`
`int` `getProcessId()`
`int` `getSession()`
`bftsmart.reconfiguration.ClientViewController` `getViewManager()`
`void` `init(int processId)` This method initializes the object TODO: Ask if this method cannot be protected (compiles, but....)
`void` `init(int processId, java.lang.String configHome)`
`void` `sendMessageToTargets(byte[] m, int reqId, int[] targets, bftsmart.tom.core.messages.TOMMessageType type)`
`void` `sendMessageToTargets(byte[] m, int reqId, int operationId, int[] targets, bftsmart.tom.core.messages.TOMMessageType type)`
`void` `TOMulticast(byte[] m, int reqId, int operationId, bftsmart.tom.core.messages.TOMMessageType reqType)`
`void` `TOMulticast(byte[] m, int reqId, bftsmart.tom.core.messages.TOMMessageType reqType)` Multicast data to the group of replicas
`void` `TOMulticast(bftsmart.tom.core.messages.TOMMessage sm)` Multicast a TOMMessage to the group of replicas

### 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()

Creates a new instance of TOMulticastSender TODO: This may really be empty?

### Method Detail

#### close

    public void close()

#### getCommunicationSystem

    public bftsmart.communication.client.CommunicationSystemClientSide getCommunicationSystem()

#### getViewManager

    public bftsmart.reconfiguration.ClientViewController getViewManager()

#### init

    public void init(int processId)

This method initializes the object TODO: Ask if this method cannot be protected (compiles, but....)

Parameters:
  `processId` - ID of the process

#### init

    public void init(int processId,
                     java.lang.String configHome)

#### getProcessId

    public int getProcessId()

#### generateRequestId

    public int generateRequestId(bftsmart.tom.core.messages.TOMMessageType type)

#### generateOperationId

    public int generateOperationId()

#### TOMulticast

    public void TOMulticast(bftsmart.tom.core.messages.TOMMessage sm)

Multicast a TOMMessage to the group of replicas

Parameters:
  `sm` - Message to be multicast

#### TOMulticast

    public void TOMulticast(byte[] m,
                            int reqId,
                            bftsmart.tom.core.messages.TOMMessageType reqType)

Multicast data to the group of replicas

Parameters:
  `m` - Data to be multicast
  `reqId` - unique integer that identifies this request
  `reqType` - TOM_NORMAL, TOM_READONLY or TOM_RECONFIGURATION

#### TOMulticast

    public void TOMulticast(byte[] m,
                            int reqId,
                            int operationId,
                            bftsmart.tom.core.messages.TOMMessageType reqType)

#### sendMessageToTargets

    public void sendMessageToTargets(byte[] m,
                                     int reqId,
                                     int[] targets,
                                     bftsmart.tom.core.messages.TOMMessageType type)

#### sendMessageToTargets

    public void sendMessageToTargets(byte[] m,
                                     int reqId,
                                     int operationId,
                                     int[] targets,
                                     bftsmart.tom.core.messages.TOMMessageType type)

#### getSession

    public int getSession()