Telnet Command Extension

Telnet Command Extension

Extension Description

All servers support telnet access for manual intervention.

Extension Interface

org.apache.dubbo.remoting.telnet.TelnetHandler

Extension Configuration

  1. <dubbo:protocol telnet="xxx,yyy" />
  2. <!-- Default value setting, when <dubbo:protocol> does not configure the telnet attribute, use this configuration -->
  3. <dubbo:provider telnet="xxx,yyy" />

Known Extensions

  • 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 Example

Maven project structure:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxTelnetHandler.java (implements TelnetHandler interface)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.remoting.telnet.TelnetHandler (plain text file, content: xxx=com.xxx.XxxTelnetHandler)

XxxTelnetHandler.java:

  1. package com.xxx;
  2. import org.apache.dubbo.remoting.telnet.TelnetHandler;
  3. @Help(parameter="...", summary="...", detail="...")
  4. public class XxxTelnetHandler implements TelnetHandler {
  5. public String telnet(Channel channel, String message) throws RemotingException {
  6. // ...
  7. }
  8. }

META-INF/dubbo/org.apache.dubbo.remoting.telnet.TelnetHandler:

  1. xxx=com.xxx.XxxTelnetHandler

Command Usage

  1. telnet 127.0.0.1 20880
  2. dubbo> xxx args

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)