public class CommunicationServiceBuilder extends Object
CommunicationService).| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
The default buffer size used, in bytes.
|
| Constructor and Description |
|---|
CommunicationServiceBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CommunicationServiceBuilder |
bufferSize(int bufferSize)
Sets the buffer size, in bytes, used for communictation
|
CommunicationServiceBuilder |
communicationPhase(String phase)
Sets the phase during which communiction takes place.
|
ServiceProvider<CommunicationService> |
create()
Creates the communication service.
|
CommunicationServiceBuilder |
delay(String socketName,
Long delay)
Adds a delay to the given socket, both uplink and downlink.
|
CommunicationServiceBuilder |
delay(String socketName,
Long updelay,
Long downdelay)
Adds a delay to the given socket.
|
CommunicationServiceBuilder |
limit(String socketName,
Integer rate)
Limits the given socket name to the given byte rates, both uplink and
downlink.
|
CommunicationServiceBuilder |
limit(String socketName,
Integer uplinkRate,
Integer downlinkRate)
Limits the given socket name to the given uplink and downlink byte rates.
|
public static final int DEFAULT_BUFFER_SIZE
public CommunicationServiceBuilder communicationPhase(String phase)
Simulation.TICK_PHASE.phase - the communiction phasepublic CommunicationServiceBuilder limit(String socketName, Integer uplinkRate, Integer downlinkRate)
socketName - the name of the socket to limituplinkRate - the uplink (client to server) byte rate per tickdownlinkRate - the downlink (server to client) byte rate per tickpublic CommunicationServiceBuilder limit(String socketName, Integer rate)
socketName - the name of the socket to limitrate - the rate to setpublic CommunicationServiceBuilder delay(String socketName, Long updelay, Long downdelay)
socketName - the name of the socket to add delay toupdelay - the uplink (client to server) delay in ticksdowndelay - the downlink (server to client) delay in tickspublic CommunicationServiceBuilder delay(String socketName, Long delay)
socketName - the name of the socket to add delay todelay - the delay in ticks to setpublic CommunicationServiceBuilder bufferSize(int bufferSize)
bufferSize - the buffer sizepublic ServiceProvider<CommunicationService> create()
Copyright © 2015. All rights reserved.