One answer is to use rundeck, I think you just need rundeck to dynamically load your nodes.
To make it dynamic you need to refresh the project. Simply restart rundeck or use the api refresh method. I haven't tried the latter which I think is the better solution. The Resource Model supports files and getting your node list of servers from an external source URL.
But if your are rolling your own a better answer maybe SSH and consider a SSH library for Java