A deployment scanner is quite a complex beast, particularly if you support exploded deployments.
The code for ours is in https://github.com/jbossas/jboss-as/tree/master/deployment-scanner particularly https://github.com/jbossas/jboss-as/blob/master/deployment-scanner/src/main/java/org/jboss/as/server/deployment/scanner/FileSystemDeploymentService.java. That's all heavily dependent on the java.io.File API though, so to borrow from that and use an HTTP store would be a significant change. It also has a lot of logic related to the marker files we use. That could be omitted if you don't deal with exploded deployments.
The biggest thing you can get out of that code is how it uses the core management APIs to actually do the deployment actions. These are the same things the CLI does under the covers.