1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-05 23:22:47 +00:00

Implements XML based service descriptor allowing to switch services

This commit is contained in:
2011-12-28 00:35:35 -02:00
parent 228f481e86
commit 976cfaf4e0
53 changed files with 1270 additions and 1171 deletions

View File

@@ -9,7 +9,7 @@
<baseDirectory></baseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/distribution/global</directory>
<directory>${project.basedir}/distribution</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>

View File

@@ -9,7 +9,7 @@
<baseDirectory></baseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/distribution/global</directory>
<directory>${project.basedir}/distribution</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>

View File

@@ -9,7 +9,7 @@
<baseDirectory></baseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/distribution/global</directory>
<directory>${project.basedir}/distribution</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>

View File

@@ -9,7 +9,7 @@
<baseDirectory></baseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/distribution/global</directory>
<directory>${project.basedir}/distribution</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>

View File

@@ -1,37 +0,0 @@
/*
* This file is part of l2jserver2 <l2jserver2.com>.
*
* l2jserver2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* l2jserver2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with l2jserver2. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver;
import com.google.inject.AbstractModule;
import com.google.inject.Module;
import com.l2jserver.model.id.provider.IDProviderModule;
import com.l2jserver.service.ServiceModule;
import com.l2jserver.service.database.OrientDBDAOModule;
/**
* The game server Google Guice {@link Module}.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class GameServerModule extends AbstractModule {
@Override
protected void configure() {
install(new ServiceModule());
install(new IDProviderModule());
install(new OrientDBDAOModule());
}
}

View File

@@ -16,8 +16,20 @@
*/
package com.l2jserver;
import java.io.IOException;
import java.nio.file.Paths;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.DOMException;
import org.xml.sax.SAXException;
import com.google.inject.Guice;
import com.l2jserver.model.id.provider.IDProviderModule;
import com.l2jserver.service.Service;
import com.l2jserver.service.ServiceException;
import com.l2jserver.service.ServiceManager;
import com.l2jserver.service.ServiceStartException;
import com.l2jserver.service.ServiceStopException;
import com.l2jserver.service.cache.CacheService;
import com.l2jserver.service.configuration.ConfigurationService;
@@ -65,17 +77,38 @@ public class L2JGameServerMain {
*/
@SuppressWarnings("unchecked")
public static void main(String[] args) {
final L2JGameServer server = new L2JGameServer();
final ServiceManager serviceManager = new ServiceManager();
try {
final ServiceManager serviceManager = server.getInjector()
.getInstance(ServiceManager.class);
serviceManager.load(Paths.get("services.xml"));
} catch (ClassNotFoundException e) {
System.out.println("Service class not found: " + e.getMessage());
e.printStackTrace();
return;
} catch (SAXException | DOMException | IOException
| ParserConfigurationException e) {
System.out.println("Error parsing XML service descriptor");
e.printStackTrace();
return;
} catch (ServiceException e) {
System.out.println("Error loading XML service descriptor");
e.printStackTrace();
return;
}
try {
serviceManager.init(Guice.createInjector(new IDProviderModule(),
serviceManager.newGuiceModule()));
} catch (ServiceStartException e) {
System.out.println("Error stating basic services");
e.printStackTrace();
return;
}
try {
for (final Class<?>[] category : SERVICES) {
for (final Class<?> service : category) {
serviceManager.start((Class<? extends Service>) service);
}
}
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
@Override
public void run() {

View File

@@ -1,137 +0,0 @@
/*
* This file is part of l2jserver2 <l2jserver2.com>.
*
* l2jserver2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* l2jserver2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with l2jserver2. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.service;
import com.google.inject.AbstractModule;
import com.google.inject.Module;
import com.google.inject.Scopes;
import com.l2jserver.service.cache.CacheService;
import com.l2jserver.service.cache.SoftCacheService;
import com.l2jserver.service.configuration.ConfigurationService;
import com.l2jserver.service.configuration.XMLConfigurationService;
import com.l2jserver.service.core.Log4JLoggingService;
import com.l2jserver.service.core.LoggingService;
import com.l2jserver.service.core.threading.ThreadService;
import com.l2jserver.service.core.threading.ThreadServiceImpl;
import com.l2jserver.service.core.vfs.TrueZipVFSService;
import com.l2jserver.service.core.vfs.VFSService;
import com.l2jserver.service.database.DatabaseService;
import com.l2jserver.service.database.GameServerOrientDatabaseService;
import com.l2jserver.service.game.AttackService;
import com.l2jserver.service.game.AttackServiceImpl;
import com.l2jserver.service.game.admin.AdministratorService;
import com.l2jserver.service.game.admin.AdministratorServiceImpl;
import com.l2jserver.service.game.character.CharacterService;
import com.l2jserver.service.game.character.CharacterServiceImpl;
import com.l2jserver.service.game.character.ShortcutService;
import com.l2jserver.service.game.character.ShortcutServiceImpl;
import com.l2jserver.service.game.chat.ChatLoggingService;
import com.l2jserver.service.game.chat.ChatService;
import com.l2jserver.service.game.chat.DatabaseChatLoggingService;
import com.l2jserver.service.game.chat.SimpleChatService;
import com.l2jserver.service.game.item.ItemService;
import com.l2jserver.service.game.item.ItemServiceImpl;
import com.l2jserver.service.game.map.pathing.MapperPathingService;
import com.l2jserver.service.game.map.pathing.PathingService;
import com.l2jserver.service.game.npc.NPCService;
import com.l2jserver.service.game.npc.NPCServiceImpl;
import com.l2jserver.service.game.scripting.ScriptingService;
import com.l2jserver.service.game.scripting.ScriptingServiceImpl;
import com.l2jserver.service.game.spawn.SpawnService;
import com.l2jserver.service.game.spawn.SpawnServiceImpl;
import com.l2jserver.service.game.template.TemplateService;
import com.l2jserver.service.game.template.XMLTemplateService;
import com.l2jserver.service.game.world.CachedWorldIDService;
import com.l2jserver.service.game.world.WorldIDService;
import com.l2jserver.service.game.world.WorldService;
import com.l2jserver.service.game.world.WorldServiceImpl;
import com.l2jserver.service.game.world.event.WorldEventDispatcher;
import com.l2jserver.service.game.world.event.WorldEventDispatcherImpl;
import com.l2jserver.service.network.NettyNetworkService;
import com.l2jserver.service.network.NetworkService;
import com.l2jserver.service.network.broadcast.BroadcastService;
import com.l2jserver.service.network.broadcast.BroadcastServiceImpl;
import com.l2jserver.service.network.gameguard.GameGuardService;
import com.l2jserver.service.network.gameguard.GameGuardServiceImpl;
import com.l2jserver.service.network.keygen.BlowfishKeygenService;
import com.l2jserver.service.network.keygen.SecureBlowfishKeygenService;
/**
* Google Guice {@link Module} for services
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class ServiceModule extends AbstractModule {
@Override
protected void configure() {
bind(ServiceManager.class).in(Scopes.SINGLETON);
bind(LoggingService.class).to(Log4JLoggingService.class).in(
Scopes.SINGLETON);
bind(VFSService.class).to(TrueZipVFSService.class).in(Scopes.SINGLETON);
bind(ThreadService.class).to(ThreadServiceImpl.class).in(
Scopes.SINGLETON);
bind(ConfigurationService.class).to(XMLConfigurationService.class).in(
Scopes.SINGLETON);
bind(CacheService.class).to(SoftCacheService.class)
.in(Scopes.SINGLETON);
bind(DatabaseService.class).to(GameServerOrientDatabaseService.class)
.in(Scopes.SINGLETON);
bind(WorldIDService.class).to(CachedWorldIDService.class).in(
Scopes.SINGLETON);
bind(PathingService.class).to(MapperPathingService.class).in(
Scopes.SINGLETON);
bind(BlowfishKeygenService.class).to(SecureBlowfishKeygenService.class)
.in(Scopes.SINGLETON);
bind(NetworkService.class).to(NettyNetworkService.class).in(
Scopes.SINGLETON);
bind(GameGuardService.class).to(GameGuardServiceImpl.class).in(
Scopes.SINGLETON);
bind(ScriptingService.class).to(ScriptingServiceImpl.class).in(
Scopes.SINGLETON);
bind(TemplateService.class).to(XMLTemplateService.class).in(
Scopes.SINGLETON);
bind(ChatService.class).to(SimpleChatService.class)
.in(Scopes.SINGLETON);
bind(ChatLoggingService.class).to(DatabaseChatLoggingService.class).in(
Scopes.SINGLETON);
bind(AdministratorService.class).to(AdministratorServiceImpl.class).in(
Scopes.SINGLETON);
bind(SpawnService.class).to(SpawnServiceImpl.class)
.in(Scopes.SINGLETON);
bind(BroadcastService.class).to(BroadcastServiceImpl.class).in(
Scopes.SINGLETON);
bind(CharacterService.class).to(CharacterServiceImpl.class).in(
Scopes.SINGLETON);
bind(ShortcutService.class).to(ShortcutServiceImpl.class).in(
Scopes.SINGLETON);
bind(AttackService.class).to(AttackServiceImpl.class).in(
Scopes.SINGLETON);
bind(NPCService.class).to(NPCServiceImpl.class).in(Scopes.SINGLETON);
bind(ItemService.class).to(ItemServiceImpl.class).in(Scopes.SINGLETON);
bind(WorldService.class).to(WorldServiceImpl.class)
.in(Scopes.SINGLETON);
bind(WorldEventDispatcher.class).to(WorldEventDispatcherImpl.class).in(
Scopes.SINGLETON);
}
}

View File

@@ -76,8 +76,6 @@ import com.mysema.query.sql.types.EnumByNameType;
public class GameServerJDBCDatabaseService extends AbstractSQLDatabaseService
implements DatabaseService {
/**
* @param configService
* the config service
* @param cacheService
* the cache service
* @param threadService
@@ -88,11 +86,10 @@ public class GameServerJDBCDatabaseService extends AbstractSQLDatabaseService
* the {@link DataAccessObject DAO} resolver
*/
@Inject
public GameServerJDBCDatabaseService(ConfigurationService configService,
CacheService cacheService, ThreadService threadService,
VFSService vfsService, DAOResolver daoResolver) {
public GameServerJDBCDatabaseService(CacheService cacheService,
ThreadService threadService, VFSService vfsService,
DAOResolver daoResolver) {
super(
configService,
cacheService,
threadService,
vfsService,
@@ -120,7 +117,8 @@ public class GameServerJDBCDatabaseService extends AbstractSQLDatabaseService
updateSchema(QLogChat.logChat);
if (updateSchema(QNPC.npc)) {
try {
importData(vfsService.resolveDataFile("static/npc.csv"), QNPC.npc);
importData(vfsService.resolveDataFile("static/npc.csv"),
QNPC.npc);
} catch (IOException e) {
throw new DatabaseException(e);
}

View File

@@ -70,8 +70,6 @@ public class GameServerOrientDatabaseService extends
private final VFSService vfsService;
/**
* @param configService
* the config service
* @param cacheService
* the cache service
* @param threadService
@@ -82,10 +80,10 @@ public class GameServerOrientDatabaseService extends
* the {@link DataAccessObject DAO} resolver
*/
@Inject
public GameServerOrientDatabaseService(ConfigurationService configService,
CacheService cacheService, ThreadService threadService,
final VFSService vfsService, DAOResolver daoResolver) {
super(configService, cacheService, threadService, daoResolver);
public GameServerOrientDatabaseService(CacheService cacheService,
ThreadService threadService, final VFSService vfsService,
DAOResolver daoResolver) {
super(cacheService, threadService, daoResolver);
this.vfsService = vfsService;
}
@@ -100,7 +98,8 @@ public class GameServerOrientDatabaseService extends
updateSchema(QLogChat.logChat);
if (updateSchema(QNPC.npc)) {
try {
importData(vfsService.resolveDataFile("static/npc.csv"), QNPC.npc);
importData(vfsService.resolveDataFile("static/npc.csv"),
QNPC.npc);
} catch (IOException e) {
throw new DatabaseException(e);
}

View File

@@ -47,14 +47,13 @@ import com.l2jserver.model.template.character.CharacterTemplate;
import com.l2jserver.model.template.item.ItemTemplate;
import com.l2jserver.model.template.npc.NPCTemplate;
import com.l2jserver.model.template.npc.TeleportationTemplate;
import com.l2jserver.service.AbstractService;
import com.l2jserver.service.AbstractConfigurableService;
import com.l2jserver.service.AbstractService.Depends;
import com.l2jserver.service.ServiceStartException;
import com.l2jserver.service.ServiceStopException;
import com.l2jserver.service.cache.Cache;
import com.l2jserver.service.cache.CacheService;
import com.l2jserver.service.configuration.ConfigurationService;
import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath;
import com.l2jserver.service.core.LoggingService;
import com.l2jserver.service.core.vfs.VFSService;
import com.l2jserver.util.jaxb.CharacterTemplateIDAdapter;
@@ -72,7 +71,8 @@ import com.l2jserver.util.jaxb.TeleportationTemplateIDAdapter;
*/
@Depends({ LoggingService.class, VFSService.class, CacheService.class,
ConfigurationService.class })
public class XMLTemplateService extends AbstractService implements
public class XMLTemplateService extends
AbstractConfigurableService<XMLTemplateServiceConfiguration> implements
TemplateService {
/**
* The logger
@@ -88,10 +88,6 @@ public class XMLTemplateService extends AbstractService implements
*/
private final CacheService cacheService;
/**
* The XML template service configuration
*/
private final XMLTemplateServiceConfiguration config;
/**
* The npc template id adapter
*/
@@ -132,36 +128,11 @@ public class XMLTemplateService extends AbstractService implements
@SuppressWarnings("rawtypes")
private Cache<TemplateID, Template> templates;
/**
* XML {@link TemplateService} configuration interface
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface XMLTemplateServiceConfiguration extends
TemplateServiceConfiguration {
/**
* @return the directory in which templates are stored
*/
@ConfigurationPropertyGetter(defaultValue = "template/")
@ConfigurationXPath("/configuration/services/template/directory")
String getTemplateDirectory();
/**
* @param file
* the directory in which templates are stored
*/
@ConfigurationPropertySetter
@ConfigurationXPath("/configuration/services/template/directory")
void setTemplateDirectory(String file);
}
/**
* @param vfsService
* the vfs service
* @param cacheService
* the cache service
* @param configService
* the configuration service
* the cache servicef
* @param npcTemplateIdAdapter
* the npc template id adapter
* @param itemTemplateIdAdapter
@@ -177,16 +148,16 @@ public class XMLTemplateService extends AbstractService implements
*/
@Inject
public XMLTemplateService(final VFSService vfsService,
CacheService cacheService, ConfigurationService configService,
CacheService cacheService,
NPCTemplateIDAdapter npcTemplateIdAdapter,
ItemTemplateIDAdapter itemTemplateIdAdapter,
SkillTemplateIDAdapter skillTemplateIdAdapter,
CharacterTemplateIDAdapter charIdTemplateAdapter,
EffectTemplateIDAdapter effectIdTemplateAdapter,
TeleportationTemplateIDAdapter teleportationIdTemplateAdapter) {
super(XMLTemplateServiceConfiguration.class);
this.vfsService = vfsService;
this.cacheService = cacheService;
this.config = configService.get(XMLTemplateServiceConfiguration.class);
this.npcTemplateIdAdapter = npcTemplateIdAdapter;
this.itemTemplateIdAdapter = itemTemplateIdAdapter;
this.skillTemplateIdAdapter = skillTemplateIdAdapter;

View File

@@ -1,42 +1,43 @@
/*
* This file is part of l2jserver2 <l2jserver2.com>.
*
* l2jserver2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* l2jserver2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with l2jserver2. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver;
import com.google.inject.Guice;
import com.google.inject.Injector;
/**
* The L2JGameServer class
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class L2JGameServer {
/**
* The server injector
*/
private final Injector injector = Guice
.createInjector(new GameServerModule());
/**
* Get the injector
*
* @return the injector
*/
public Injector getInjector() {
return injector;
}
}
/*
* This file is part of l2jserver2 <l2jserver2.com>.
*
* l2jserver2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* l2jserver2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with l2jserver2. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.service.game.template;
import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath;
import com.l2jserver.service.game.template.TemplateService.TemplateServiceConfiguration;
/**
* XML {@link TemplateService} configuration interface
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface XMLTemplateServiceConfiguration extends
TemplateServiceConfiguration {
/**
* @return the directory in which templates are stored
*/
@ConfigurationPropertyGetter(defaultValue = "template/")
@ConfigurationXPath("templates/@root")
String getTemplateDirectory();
/**
* @param file
* the directory in which templates are stored
*/
@ConfigurationPropertySetter
@ConfigurationXPath("templates/@root")
void setTemplateDirectory(String file);
}

View File

@@ -39,9 +39,8 @@ import com.l2jserver.game.net.Lineage2Client;
import com.l2jserver.game.net.Lineage2PipelineFactory;
import com.l2jserver.game.net.packet.ServerPacket;
import com.l2jserver.model.id.object.CharacterID;
import com.l2jserver.service.AbstractService;
import com.l2jserver.service.AbstractConfigurableService;
import com.l2jserver.service.AbstractService.Depends;
import com.l2jserver.service.configuration.ConfigurationService;
import com.l2jserver.service.core.LoggingService;
import com.l2jserver.service.core.threading.ThreadPool;
import com.l2jserver.service.core.threading.ThreadPoolPriority;
@@ -58,7 +57,8 @@ import com.l2jserver.util.factory.CollectionFactory;
*/
@Depends({ LoggingService.class, ThreadService.class,
BlowfishKeygenService.class, WorldService.class })
public class NettyNetworkService extends AbstractService implements
public class NettyNetworkService extends
AbstractConfigurableService<NetworkServiceConfiguration> implements
NetworkService {
/**
* The logger
@@ -70,10 +70,6 @@ public class NettyNetworkService extends AbstractService implements
*/
private final ThreadService threadService;
/**
* The network configuration object
*/
private final NetworkConfiguration config;
/**
* The Google Guice {@link Injector}
*/
@@ -101,18 +97,15 @@ public class NettyNetworkService extends AbstractService implements
private Set<Lineage2Client> clients = CollectionFactory.newSet();
/**
* @param configService
* the configuration service
* @param injector
* the {@link Guice} {@link Injector}
* @param threadService
* the {@link ThreadService}
*/
@Inject
public NettyNetworkService(ConfigurationService configService,
Injector injector, ThreadService threadService) {
public NettyNetworkService(Injector injector, ThreadService threadService) {
super(NetworkServiceConfiguration.class);
this.threadService = threadService;
this.config = configService.get(NetworkConfiguration.class);
this.injector = injector;
InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
}

View File

@@ -16,7 +16,6 @@
*/
package com.l2jserver.service.network;
import java.net.InetSocketAddress;
import com.l2jserver.game.net.Lineage2Client;
import com.l2jserver.game.net.Lineage2Session;
@@ -25,9 +24,6 @@ import com.l2jserver.game.net.packet.ServerPacket;
import com.l2jserver.model.id.object.CharacterID;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.service.Service;
import com.l2jserver.service.ServiceConfiguration;
import com.l2jserver.service.configuration.Configuration;
import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath;
/**
* The network service is responsible for communicating the server with the game
@@ -66,32 +62,6 @@ import com.l2jserver.service.configuration.XMLConfigurationService.Configuration
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface NetworkService extends Service {
/**
* The network {@link Configuration}
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface NetworkConfiguration extends ServiceConfiguration {
/**
* Get the server listen address
*
* @return the listen address
*/
@ConfigurationPropertyGetter(defaultValue = "0.0.0.0:7777")
@ConfigurationXPath("/configuration/services/network/listen")
InetSocketAddress getListenAddress();
/**
* Set the server listen address
*
* @param addr
* the listen address
*/
@ConfigurationPropertySetter
@ConfigurationXPath("/configuration/services/network/listen")
void setListenAddress(InetSocketAddress addr);
}
/**
* Registers a new client
*

View File

@@ -0,0 +1,49 @@
/*
* This file is part of l2jserver2 <l2jserver2.com>.
*
* l2jserver2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* l2jserver2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with l2jserver2. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.service.network;
import java.net.InetSocketAddress;
import com.l2jserver.service.ServiceConfiguration;
import com.l2jserver.service.configuration.Configuration;
import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath;
/**
* The network {@link Configuration}
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface NetworkServiceConfiguration extends ServiceConfiguration {
/**
* Get the server listen address
*
* @return the listen address
*/
@ConfigurationPropertyGetter(defaultValue = "0.0.0.0:7777")
@ConfigurationXPath("server/@listen")
InetSocketAddress getListenAddress();
/**
* Set the server listen address
*
* @param addr
* the listen address
*/
@ConfigurationPropertySetter
@ConfigurationXPath("server/@listen")
void setListenAddress(InetSocketAddress addr);
}