Another place to start is by looking at some server adapter out there. The Generic server adapter or the Tomcat server adapter, are probably the best ones to start with:
In particular to the generic server adapters, this is a extension of our framework. It allows you to create your own server adapter by providing a simple xml file and no java code.
Take a look at its implementation and hopefully complete your task.