This commit is contained in:
jinyu 2015-11-20 14:39:41 +08:00
parent 3b1abd1a27
commit e6a46b1ece

View File

@ -159,16 +159,16 @@ public final class WeixinServerBootstrap {
* 默认端口启动服务 * 默认端口启动服务
* *
*/ */
public Channel startup() throws WeixinException { public void startup() throws WeixinException {
return startup(DEFAULT_SERVERPORT); startup(DEFAULT_SERVERPORT);
} }
/** /**
* 指定端口启动服务 * 指定端口启动服务
* *
*/ */
public Channel startup(int serverPort) throws WeixinException { public void startup(int serverPort) throws WeixinException {
return startup(DEFAULT_BOSSTHREADS, DEFAULT_WORKERTHREADS, serverPort); startup(DEFAULT_BOSSTHREADS, DEFAULT_WORKERTHREADS, serverPort);
} }
/** /**
@ -183,7 +183,7 @@ public final class WeixinServerBootstrap {
* @return * @return
* @throws WeixinException * @throws WeixinException
*/ */
public Channel startup(int bossThreads, int workerThreads, int serverPort) public void startup(int bossThreads, int workerThreads, int serverPort)
throws WeixinException { throws WeixinException {
messageDispatcher.setMessageHandlerList(messageHandlerList); messageDispatcher.setMessageHandlerList(messageHandlerList);
messageDispatcher.setMessageInterceptorList(messageInterceptorList); messageDispatcher.setMessageInterceptorList(messageInterceptorList);
@ -201,7 +201,7 @@ public final class WeixinServerBootstrap {
messageDispatcher)); messageDispatcher));
Channel ch = b.bind(serverPort).sync().channel(); Channel ch = b.bind(serverPort).sync().channel();
logger.info("weixin4j server startup OK:{}", serverPort); logger.info("weixin4j server startup OK:{}", serverPort);
return ch.closeFuture().channel(); ch.closeFuture().sync();
} catch (WeixinException e) { } catch (WeixinException e) {
throw e; throw e;
} catch (InterruptedException e) { } catch (InterruptedException e) {