Пример #1
0
 @Override
 protected void doStop() throws Exception {
   super.doStop();
   if (server != null) {
     server.close();
   }
 }
Пример #2
0
 @Override
 protected void doStart() throws Exception {
   AvroConfiguration configuration = getEndpoint().getConfiguration();
   server = new HttpServer(new AvroResponder(this), configuration.getPort());
   server.start();
 }