Skip to content

Instantly share code, notes, and snippets.

View dhanji's full-sized avatar

Dhanji R. Prasanna dhanji

View GitHub Profile
@dhanji
dhanji / PersonService.java
Created May 4, 2011 01:02
Async IO Sitebricks design try
@At("/person/:name") @Async
public class PersonService {
@Before
void pre(Request request, @Named("name") String name) {
System.out.println("headers were: " + request.headers());
// We can either return a "Reply" here, or do nothing to continue processing
}
@At("/person") @Async
public class PersonService {
@Before
void pre(Request request) {
System.out.println("headers were: " + request.headers());
}
/**
* Callback for request body. Can return a continuation, which will