mirror of
https://gitee.com/arthas/arthas.git
synced 2024-11-30 03:07:37 +08:00
allow skip bind telnet port or http port. fix #284
This commit is contained in:
parent
34a4a8a829
commit
326cd2fe9a
@ -85,10 +85,18 @@ public class ArthasBootstrap {
|
||||
List<CommandResolver> resolvers = new ArrayList<CommandResolver>();
|
||||
resolvers.add(builtinCommands);
|
||||
// TODO: discover user provided command resolver
|
||||
shellServer.registerTermServer(new TelnetTermServer(
|
||||
configure.getIp(), configure.getTelnetPort(), options.getConnectionTimeout()));
|
||||
shellServer.registerTermServer(new HttpTermServer(
|
||||
configure.getIp(), configure.getHttpPort(), options.getConnectionTimeout()));
|
||||
if (configure.getTelnetPort() > 0) {
|
||||
shellServer.registerTermServer(new TelnetTermServer(configure.getIp(), configure.getTelnetPort(),
|
||||
options.getConnectionTimeout()));
|
||||
} else {
|
||||
logger.info("telnet port is {}, skip bind telnet server.", configure.getTelnetPort());
|
||||
}
|
||||
if (configure.getHttpPort() > 0) {
|
||||
shellServer.registerTermServer(new HttpTermServer(configure.getIp(), configure.getHttpPort(),
|
||||
options.getConnectionTimeout()));
|
||||
} else {
|
||||
logger.info("http port is {}, skip bind http server.", configure.getHttpPort());
|
||||
}
|
||||
|
||||
for (CommandResolver resolver : resolvers) {
|
||||
shellServer.registerCommandResolver(resolver);
|
||||
|
Loading…
Reference in New Issue
Block a user