[
https://issues.apache.org/jira/browse/DEFT-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johnathan Meehan updated DEFT-100:
----------------------------------
Attachment: deft-100.patch
Attachment is incomplete and broken, but need to get other work committed
before this can be properly merged. So, here for safekeeping and not review.
Certainly agree with removing the old way of creating handlers, and annotation
is implemented as proposed.
> Annotate RequestHandlers
> ------------------------
>
> Key: DEFT-100
> URL: https://issues.apache.org/jira/browse/DEFT-100
> Project: Deft
> Issue Type: New Feature
> Components: Core
> Assignee: Johnathan Meehan
> Priority: Minor
> Fix For: 0.4.0
>
> Attachments: deft-100.patch
>
>
> Just a thought.
> Proposal:
> @Path("/")
> class SynchronousRequestHandler extends RequestHandler {
> @Override
> public void get(HttpRequest request, HttpResponse response) {
> response.write("hello world!");
> }
> }
> public static void main(String[] args) {
> List <RequestHandler> handlers = new LinkedList<RequestHandler>();
> handlers.add(new SynchronousRequestHandler());
> HttpServer server = new HttpServer(new Application(handlers));
> server.listen(8080);
> IOLoop.INSTANCE.start();
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira