This involves in getting the connection parameters through command line, which is provided from jenkins-agent.jnlp.jelly file in the core.
jenkins-agent.jnlp.jelly
Launcher