package cn.flightfeather.supervision.infrastructure.service
|
|
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.stereotype.Component
|
|
@Component
|
class ServerManager {
|
|
@Autowired
|
private lateinit var tcpServer: AbstractNettyServer
|
|
@Throws(Exception::class)
|
fun startServer(port: Int) {
|
tcpServer.startServer(port)
|
}
|
|
@Throws(Exception::class)
|
fun startServer() {
|
println("tcpserver: " + tcpServer)
|
tcpServer.startServer()
|
}
|
|
@Throws(Exception::class)
|
fun stopServer() {
|
tcpServer.stopServer()
|
}
|
}
|