Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • Supervisord4j * =====================

This is a simple java client for Supervisor’s XML-RPC API. There are many third-party client which you can find by visiting: Third Party Applications and Libraries But no java was found. the client was simple enough, it is depend on no other jars. So you can import into you project easily.

API

the following method has been implemented and tested.

supervisord system related

  • getSupervisorVersion
  • getIdentification
  • getState
  • getPID
  • readLog
  • clearLog
  • shutdown
  • restart
  • listMethods
  • methodHelp
  • methodSignature(not tested)
  • multicall

process related

  • getProcessInfo
  • getAllProcessInfo
  • startAllProcesses
  • startProcessGroup (not tested)
  • stopProcess
  • stopProcessGroup(not tested)
  • stopAllProcesses
  • signalProcess(not tested)
  • signalProcessGroup(not tested)
  • signalAllProcesses(not tested)
  • sendProcessStdin(not tested)
  • sendRemoteCommEvent(not tested)
  • reloadConfig (not impl)
  • addProcessGroup
  • removeProcessGroup
  • readProcessStdoutLog
  • readProcessStderrLog
  • tailProcessStdoutLog
  • tailProcessStderrLog
  • clearProcessLogs
  • clearAllProcessLogs

the method should be enough for common use, if u want more . u can pull requests.


#Usage

  • Enable/Uncomment inet_http_server (found in supervisord.conf) for all your supervisord servers.
[inet_http_server]
port=*:9001
username="yourusername"
password="yourpass"

If not visited by the same server , maybe you should config the iptables

  • The Java Sample Code
   Supervisord supervisord = Supervisord
       //API ADDR,Default:http://localhost:9001/RPC2
                .connect(api)  
          // USERNAME AND PASSWORD       
                .auth(userName, password)
          // the Identification, U shoud find it in "supervisord.conf" default supervisor
                .namespace("supervisor")
                .proxy("HOST","PORT") //IF NEED
         ;

Happy supervisord.

#Thanks to

About

A Java Client for Supervisord's XML RPC API

Resources

Stars

26 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages