Simple rest handler for Java