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