setamagiga/InfoApi — pull request #2 by jonnay (2012-01-27 20:23:50+00:00)
Title: Massive Changes to InfoApi

Here is a list of changes:

ClientWorker:
- Added a pom.xml and changed source layout to match maven. (Makes building the code much easier)
- Removed non HTTP/Reflection related behavior out of clientworker
- Added ability to act on any HTTP verb, not just GET
- URL is handled as being an instance of the URL class
- Removal of Multiple commands, now only a single command on a URL

Moved to a dual-thread model, where the server runs on its own thread and handles HTTP requests. The Single-thread-per-request model was failing hard on my box and pinning the CPU.

Added a HttpResponse Abstract type, with 2 concrete types (ClientResponse and Error Response). In the future this will allow us to use a different content type from text (i.e. JSON if desired). this also allows for better HTTP header handling by the server

Proper, Bukkit style Config.yml now.

When the secret isn't provided, a 403 error is thrown

When the secret is set to "secret" we throw angry warnings to the console on every API request.

Endpoints are now handled dynamically. New endpoints can be created by 3rd parties, and plugged into the main InfoAPI system. This is currently done via jar files. Ideally classes should also be able to register themselves as an endpoint at runtime. (for a future version)

Added the GPL