a template for Java API server