public class ServerConfig extends Object
SimulatorConfiguration
.
Default configuration:
Constructor and Description |
---|
ServerConfig() |
Modifier and Type | Method and Description |
---|---|
ServerConfig |
annotationConfig(SmppServerConfig annotationConfig)
Merge with configuration provided by annotation.
|
SimulatorConfiguration |
build()
Create the final
SimulatorConfiguration that is used by the SMPP
server. |
ServerConfig |
credentials(String systemId,
String password)
Register allowed credentials.
|
ServerConfig |
keepMessages(boolean keep)
If the server is restarted, it indicates if received messages in the
previous session should be kept (true) or dropped (false).
|
ServerConfig |
port(int port)
Start the server with a fixed port.
|
ServerConfig |
randomPort()
Start the server with a random port.
|
ServerConfig |
randomPort(int maxPort)
Start the server with a random port.
|
ServerConfig |
randomPort(int minPort,
int maxPort)
Start the server with a random port.
|
SlowConfig |
slow()
Configure the simulator to behave like a slow server.
|
public ServerConfig port(int port)
port
- the port valuepublic ServerConfig randomPort()
RandomPortUtils.PORT_RANGE_MIN
,
RandomPortUtils.PORT_RANGE_MAX
].public ServerConfig randomPort(int maxPort)
RandomPortUtils.PORT_RANGE_MIN
, maxPort
].maxPort
- the maximum port valuepublic ServerConfig randomPort(int minPort, int maxPort)
minPort
, maxPort
].minPort
- the minimum port valuemaxPort
- the maximum port valuepublic ServerConfig credentials(String systemId, String password)
systemId
- the system_idpassword
- the passwordpublic SlowConfig slow()
public ServerConfig annotationConfig(SmppServerConfig annotationConfig)
annotationConfig
- the annotation configurationpublic ServerConfig keepMessages(boolean keep)
keep
- indicate if messages should be kept or not between sessionspublic SimulatorConfiguration build()
SimulatorConfiguration
that is used by the SMPP
server.Copyright © 2021. All rights reserved.