mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-10 09:22:49 +00:00
First commit
Change-Id: I4d273faba7286288d2b9a214c87c39a76724d787
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.l2jserver.service.network;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.service.configuration.ConfigurationService;
|
||||
|
||||
public class NettyNetworkService implements NetworkService {
|
||||
private final NetworkConfiguration config;
|
||||
|
||||
@Inject
|
||||
public NettyNetworkService(ConfigurationService configService) {
|
||||
this.config = configService.get(NetworkConfiguration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.l2jserver.service.network;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import com.l2jserver.service.configuration.Configuration;
|
||||
import com.l2jserver.service.configuration.Configuration.ConfigurationName;
|
||||
import com.l2jserver.service.configuration.Configuration.ConfigurationPrefix;
|
||||
|
||||
@ConfigurationName("network")
|
||||
@ConfigurationPrefix("net")
|
||||
public interface NetworkConfiguration extends Configuration {
|
||||
// TODO set default value
|
||||
/**
|
||||
* Get the server listen address
|
||||
*
|
||||
* @return the listen address
|
||||
*/
|
||||
@ConfigurationPropertyGetter(name = "listen", defaultValue = "0.0.0.0:54")
|
||||
InetSocketAddress getListenAddress();
|
||||
|
||||
/**
|
||||
* Set the server listen address
|
||||
*
|
||||
* @param addr
|
||||
* the listen address
|
||||
*/
|
||||
@ConfigurationPropertySetter(name = "listen")
|
||||
void setListenAddress(InetSocketAddress addr);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.l2jserver.service.network;
|
||||
|
||||
import com.l2jserver.service.Service;
|
||||
|
||||
public interface NetworkService extends Service {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user