1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 09:22:49 +00:00

Implemented service dependencies

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-17 19:53:08 -03:00
parent 31cc1a97e3
commit 8b5a601ea4
25 changed files with 338 additions and 145 deletions

View File

@@ -33,7 +33,11 @@ import com.l2jserver.game.net.Lineage2Connection;
import com.l2jserver.game.net.Lineage2PipelineFactory;
import com.l2jserver.model.id.object.CharacterID;
import com.l2jserver.service.AbstractService;
import com.l2jserver.service.AbstractService.Depends;
import com.l2jserver.service.blowfish.BlowfishKeygenService;
import com.l2jserver.service.configuration.ConfigurationService;
import com.l2jserver.service.game.world.WorldService;
import com.l2jserver.service.logging.LoggingService;
import com.l2jserver.util.factory.CollectionFactory;
/**
@@ -41,6 +45,8 @@ import com.l2jserver.util.factory.CollectionFactory;
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
@Depends({ LoggingService.class, BlowfishKeygenService.class,
WorldService.class })
public class NettyNetworkService extends AbstractService implements
NetworkService {
/**
@@ -75,7 +81,7 @@ public class NettyNetworkService extends AbstractService implements
}
@Override
public void start() {
protected void doStart() {
server = new ServerBootstrap(new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool()));
@@ -116,7 +122,7 @@ public class NettyNetworkService extends AbstractService implements
}
@Override
public void stop() {
protected void doStop() {
try {
channel.close().awaitUninterruptibly();
} finally {