TelnetHandler Extension
Summary
Extension to telnet command. All server should support telnet access for operation convenience.
Extension Interface
org.apache.dubbo.remoting.telnet.TelnetHandler
Extension Configuration
<dubbo:protocol telnet="xxx,yyy" />
<!-- default configuration, will take effect if telnet attribute is not specified in <dubbo:protocol> -->
<dubbo:provider telnet="xxx,yyy" />
Existing Extension
org.apache.dubbo.remoting.telnet.support.ClearTelnetHandler
org.apache.dubbo.remoting.telnet.support.ExitTelnetHandler
org.apache.dubbo.remoting.telnet.support.HelpTelnetHandler
org.apache.dubbo.remoting.telnet.support.StatusTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.ListTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.ChangeTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.CurrentTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.InvokeTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.TraceTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.CountTelnetHandler
org.apache.dubbo.rpc.dubbo.telnet.PortTelnetHandler
Extension Guide
Directory layout:
src
|-main
|-java
|-com
|-xxx
|-XxxTelnetHandler.java (TelnetHandler implementation)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.remoting.telnet.TelnetHandler (plain text file with the content: xxx=com.xxx.XxxTelnetHandler)
XxxTelnetHandler.java:
package com.xxx;
import org.apache.dubbo.remoting.telnet.TelnetHandler;
@Help(parameter="...", summary="...", detail="...")
public class XxxTelnetHandler implements TelnetHandler {
public String telnet(Channel channel, String message) throws RemotingException {
// ...
}
}
META-INF/dubbo/org.apache.dubbo.remoting.telnet.TelnetHandler:
xxx=com.xxx.XxxTelnetHandler
How To Use
telnet 127.0.0.1 20880
dubbo> xxx args
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified January 22, 2021: Merge branch 'master' of https://github.com/apache/dubbo-website (f48eac9)