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

Better event system

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-18 02:09:14 -03:00
parent be329a50e9
commit cd41122035
34 changed files with 660 additions and 186 deletions

View File

@@ -49,6 +49,11 @@ import com.l2jserver.util.factory.CollectionFactory;
WorldService.class })
public class NettyNetworkService extends AbstractService implements
NetworkService {
/**
* The {@link WorldService} instance
*/
private final WorldService worldService;
/**
* The network configuration object
*/
@@ -74,9 +79,10 @@ public class NettyNetworkService extends AbstractService implements
@Inject
public NettyNetworkService(ConfigurationService configService,
Injector injector) {
Injector injector, WorldService worldService) {
this.config = configService.get(NetworkConfiguration.class);
this.injector = injector;
this.worldService = worldService;
InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
}
@@ -85,7 +91,8 @@ public class NettyNetworkService extends AbstractService implements
server = new ServerBootstrap(new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool()));
server.setPipelineFactory(new Lineage2PipelineFactory(injector, this));
server.setPipelineFactory(new Lineage2PipelineFactory(injector, this,
worldService));
channel = (ServerChannel) server.bind(config.getListenAddress());
}