Java custom rest server