From 798e34fcfcbc427079d8b532669546d1b107bcc0 Mon Sep 17 00:00:00 2001 From: Rogiel Date: Mon, 12 Dec 2011 13:49:44 -0200 Subject: [PATCH] Service and transformer improvements --- .gitignore | 3 +- .../l2jserver/service/AbstractService.java | 2 +- .../service/configuration/Configuration.java | 3 ++ .../ProxyConfigurationService.java | 14 ++--- .../service/core/vfs/VFSService.java | 6 +-- .../database/AbstractJDBCDatabaseService.java | 30 +++++------ .../AbstractOrientDatabaseService.java | 14 ++--- .../util/transformer/TransformException.java | 54 +++++++++++++++++++ .../util/transformer/Transformer.java | 8 ++- .../transformer/impl/ClassTransformer.java | 3 +- .../impl/InetSocketAddressTransformer.java | 3 +- .../util/transformer/impl/URLTransformer.java | 3 +- .../game/template/XMLTemplateService.java | 6 +-- .../service/network/NetworkService.java | 6 +-- .../gameserver/GameServerNetworkService.java | 6 +-- 15 files changed, 112 insertions(+), 49 deletions(-) create mode 100644 l2jserver2-common/src/main/java/com/l2jserver/util/transformer/TransformException.java diff --git a/.gitignore b/.gitignore index 95dd6d468..a68c78eea 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,4 @@ target/ # Find bugs configuration file -/.fbprefs -/l2jserver2-site +/.fbprefs \ No newline at end of file diff --git a/l2jserver2-common/src/main/java/com/l2jserver/service/AbstractService.java b/l2jserver2-common/src/main/java/com/l2jserver/service/AbstractService.java index 138068e57..e176646ff 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/service/AbstractService.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/service/AbstractService.java @@ -91,7 +91,7 @@ public abstract class AbstractService implements Service { } @Override - public Class[] getDependencies() { + public final Class[] getDependencies() { final Depends deps = this.getClass().getAnnotation(Depends.class); if (deps == null) return null; diff --git a/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/Configuration.java b/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/Configuration.java index df40bf477..8b76bf42a 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/Configuration.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/Configuration.java @@ -16,6 +16,7 @@ */ package com.l2jserver.service.configuration; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -45,6 +46,7 @@ public interface Configuration { */ @Retention(RetentionPolicy.RUNTIME) @Target(value = ElementType.METHOD) + @Documented public @interface ConfigurationPropertyGetter { /** * @return the default value to be used @@ -61,6 +63,7 @@ public interface Configuration { */ @Retention(RetentionPolicy.RUNTIME) @Target(value = ElementType.METHOD) + @Documented public @interface ConfigurationPropertySetter { } } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/ProxyConfigurationService.java b/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/ProxyConfigurationService.java index bff4d1efd..4c4fe0122 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/ProxyConfigurationService.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/service/configuration/ProxyConfigurationService.java @@ -73,7 +73,7 @@ public class ProxyConfigurationService extends AbstractService implements @Retention(RetentionPolicy.RUNTIME) @Documented @Target(value = ElementType.METHOD) - public @interface ConfigurationPropertiesKey { + public @interface ConfigurationPropertyKey { String value(); } @@ -156,8 +156,8 @@ public class ProxyConfigurationService extends AbstractService implements if (args == null || args.length == 0) { final ConfigurationPropertyGetter getter = method .getAnnotation(ConfigurationPropertyGetter.class); - final ConfigurationPropertiesKey propertiesKey = method - .getAnnotation(ConfigurationPropertiesKey.class); + final ConfigurationPropertyKey propertiesKey = method + .getAnnotation(ConfigurationPropertyKey.class); if (getter == null) return null; if (propertiesKey == null) @@ -166,8 +166,8 @@ public class ProxyConfigurationService extends AbstractService implements } else if (args.length == 1) { final ConfigurationPropertySetter setter = method .getAnnotation(ConfigurationPropertySetter.class); - final ConfigurationPropertiesKey propertiesKey = method - .getAnnotation(ConfigurationPropertiesKey.class); + final ConfigurationPropertyKey propertiesKey = method + .getAnnotation(ConfigurationPropertyKey.class); if (setter == null) return null; if (propertiesKey == null) @@ -189,7 +189,7 @@ public class ProxyConfigurationService extends AbstractService implements * @return the untransformed property */ private Object get(ConfigurationPropertyGetter getter, - ConfigurationPropertiesKey propertiesKey, Class type) { + ConfigurationPropertyKey propertiesKey, Class type) { if (cache.containsKey(propertiesKey.value())) return cache.get(propertiesKey.value()); Object o = untransform( @@ -208,7 +208,7 @@ public class ProxyConfigurationService extends AbstractService implements * @param type * the transformed type */ - private void set(ConfigurationPropertiesKey setter, Object value, + private void set(ConfigurationPropertyKey setter, Object value, Class type) { if (value != null) { properties.setProperty(setter.value(), diff --git a/l2jserver2-common/src/main/java/com/l2jserver/service/core/vfs/VFSService.java b/l2jserver2-common/src/main/java/com/l2jserver/service/core/vfs/VFSService.java index 1ead356c4..96ac68573 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/service/core/vfs/VFSService.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/service/core/vfs/VFSService.java @@ -23,7 +23,7 @@ import com.l2jserver.service.Service; import com.l2jserver.service.ServiceConfiguration; import com.l2jserver.service.configuration.Configuration; import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationName; -import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertiesKey; +import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertyKey; import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath; /** @@ -45,7 +45,7 @@ public interface VFSService extends Service { * @return the VFS root {@link URI} */ @ConfigurationPropertyGetter(defaultValue = "") - @ConfigurationPropertiesKey("vfs.root") + @ConfigurationPropertyKey("vfs.root") @ConfigurationXPath("/configuration/services/vfs/root") Path getRoot(); @@ -54,7 +54,7 @@ public interface VFSService extends Service { * the new VFS root {@link URI} */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("vfs.root") + @ConfigurationPropertyKey("vfs.root") @ConfigurationXPath("/configuration/services/vfs/root") void setRoot(Path root); } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractJDBCDatabaseService.java b/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractJDBCDatabaseService.java index fab05a5b1..1627f09ef 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractJDBCDatabaseService.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractJDBCDatabaseService.java @@ -47,7 +47,7 @@ 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.ProxyConfigurationService.ConfigurationPropertiesKey; +import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertyKey; import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath; import com.l2jserver.service.core.threading.ScheduledAsyncFuture; import com.l2jserver.service.core.threading.ThreadService; @@ -139,7 +139,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the jdbc url */ @ConfigurationPropertyGetter(defaultValue = "jdbc:mysql://localhost/l2jserver2") - @ConfigurationPropertiesKey("jdbc.url") + @ConfigurationPropertyKey("jdbc.url") @ConfigurationXPath("/configuration/services/database/jdbc/url") String getJdbcUrl(); @@ -148,7 +148,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the new jdbc url */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.url") + @ConfigurationPropertyKey("jdbc.url") @ConfigurationXPath("/configuration/services/database/jdbc/url") void setJdbcUrl(String jdbcUrl); @@ -156,7 +156,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the jdbc driver class */ @ConfigurationPropertyGetter(defaultValue = "com.jdbc.jdbc.Driver") - @ConfigurationPropertiesKey("jdbc.driver") + @ConfigurationPropertyKey("jdbc.driver") @ConfigurationXPath("/configuration/services/database/jdbc/driver") String getDriver(); @@ -165,7 +165,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the new jdbc driver */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.driver") + @ConfigurationPropertyKey("jdbc.driver") @ConfigurationXPath("/configuration/services/database/jdbc/driver") void setDriver(Class driver); @@ -173,7 +173,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the jdbc database username */ @ConfigurationPropertyGetter(defaultValue = "l2j") - @ConfigurationPropertiesKey("jdbc.username") + @ConfigurationPropertyKey("jdbc.username") @ConfigurationXPath("/configuration/services/database/jdbc/username") String getUsername(); @@ -182,7 +182,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the jdbc database username */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.username") + @ConfigurationPropertyKey("jdbc.username") @ConfigurationXPath("/configuration/services/database/jdbc/username") void setUsername(String username); @@ -190,7 +190,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the jdbc database password */ @ConfigurationPropertyGetter(defaultValue = "changeme") - @ConfigurationPropertiesKey("jdbc.password") + @ConfigurationPropertyKey("jdbc.password") @ConfigurationXPath("/configuration/services/database/jdbc/password") String getPassword(); @@ -199,7 +199,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the jdbc database password */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.password") + @ConfigurationPropertyKey("jdbc.password") @ConfigurationXPath("/configuration/services/database/jdbc/password") void setPassword(String password); @@ -207,7 +207,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the maximum number of active connections */ @ConfigurationPropertyGetter(defaultValue = "20") - @ConfigurationPropertiesKey("jdbc.active.max") + @ConfigurationPropertyKey("jdbc.active.max") @ConfigurationXPath("/configuration/services/database/connections/active-maximum") int getMaxActiveConnections(); @@ -216,7 +216,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the maximum number of active connections */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.active.max") + @ConfigurationPropertyKey("jdbc.active.max") @ConfigurationXPath("/configuration/services/database/connections/active-maximum") void setMaxActiveConnections(int password); @@ -224,7 +224,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the maximum number of idle connections */ @ConfigurationPropertyGetter(defaultValue = "20") - @ConfigurationPropertiesKey("jdbc.idle.max") + @ConfigurationPropertyKey("jdbc.idle.max") @ConfigurationXPath("/configuration/services/database/connections/idle-maximum") int getMaxIdleConnections(); @@ -233,7 +233,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the maximum number of idle connections */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.idle.max") + @ConfigurationPropertyKey("jdbc.idle.max") @ConfigurationXPath("/configuration/services/database/connections/idle-maximum") void setMaxIdleConnections(int password); @@ -241,7 +241,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * @return the minimum number of idle connections */ @ConfigurationPropertyGetter(defaultValue = "5") - @ConfigurationPropertiesKey("jdbc.idle.min") + @ConfigurationPropertyKey("jdbc.idle.min") @ConfigurationXPath("/configuration/services/database/connections/idle-minimum") int getMinIdleConnections(); @@ -250,7 +250,7 @@ public abstract class AbstractJDBCDatabaseService extends AbstractService * the minimum number of idle connections */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.idle.min") + @ConfigurationPropertyKey("jdbc.idle.min") @ConfigurationXPath("/configuration/services/database/connections/idle-minimum") void setMinIdleConnections(int password); } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractOrientDatabaseService.java b/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractOrientDatabaseService.java index 673cd5bba..79e497805 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractOrientDatabaseService.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/service/database/AbstractOrientDatabaseService.java @@ -37,7 +37,7 @@ 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.ProxyConfigurationService.ConfigurationPropertiesKey; +import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertyKey; import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath; import com.l2jserver.service.core.threading.ScheduledAsyncFuture; import com.l2jserver.service.core.threading.ThreadService; @@ -117,7 +117,7 @@ public abstract class AbstractOrientDatabaseService extends AbstractService * @return the orientdb url */ @ConfigurationPropertyGetter(defaultValue = "file:data/database") - @ConfigurationPropertiesKey("orientdb.url") + @ConfigurationPropertyKey("orientdb.url") @ConfigurationXPath("/configuration/services/database/orientdb/url") String getUrl(); @@ -126,7 +126,7 @@ public abstract class AbstractOrientDatabaseService extends AbstractService * the new orientdb url */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("orientdb.url") + @ConfigurationPropertyKey("orientdb.url") @ConfigurationXPath("/configuration/services/database/orientdb/url") void setUrl(String url); @@ -134,7 +134,7 @@ public abstract class AbstractOrientDatabaseService extends AbstractService * @return the orientdb database username */ @ConfigurationPropertyGetter(defaultValue = "l2j") - @ConfigurationPropertiesKey("orientdb.username") + @ConfigurationPropertyKey("orientdb.username") @ConfigurationXPath("/configuration/services/database/orientdb/username") String getUsername(); @@ -143,7 +143,7 @@ public abstract class AbstractOrientDatabaseService extends AbstractService * the orientdb database username */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("orientdb.username") + @ConfigurationPropertyKey("orientdb.username") @ConfigurationXPath("/configuration/services/database/orientdb/username") void setUsername(String username); @@ -151,7 +151,7 @@ public abstract class AbstractOrientDatabaseService extends AbstractService * @return the orientdb database password */ @ConfigurationPropertyGetter(defaultValue = "changeme") - @ConfigurationPropertiesKey("orientdb.password") + @ConfigurationPropertyKey("orientdb.password") @ConfigurationXPath("/configuration/services/database/orientdb/password") String getPassword(); @@ -160,7 +160,7 @@ public abstract class AbstractOrientDatabaseService extends AbstractService * the jdbc database password */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("jdbc.password") + @ConfigurationPropertyKey("jdbc.password") @ConfigurationXPath("/configuration/services/database/jdbc/password") void setPassword(String password); } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/TransformException.java b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/TransformException.java new file mode 100644 index 000000000..c691742b9 --- /dev/null +++ b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/TransformException.java @@ -0,0 +1,54 @@ +/* + * This file is part of l2jserver2 . + * + * 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 . + */ +package com.l2jserver.util.transformer; + +/** + * @author Rogiel + * + */ +public class TransformException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public TransformException() { + } + + /** + * @param message + * the message + */ + public TransformException(String message) { + super(message); + } + + /** + * @param cause + * the cause + */ + public TransformException(Throwable cause) { + super(cause); + } + + /** + * @param message + * the message + * @param cause + * the cause + */ + public TransformException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/Transformer.java b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/Transformer.java index aa1228cee..628ad3dce 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/Transformer.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/Transformer.java @@ -32,8 +32,10 @@ public interface Transformer { * @param value * the object * @return the string of the object + * @throws TransformException + * if any error occur while transforming */ - String transform(T value); + String transform(T value) throws TransformException; /** * Untransforms the string back to an object @@ -41,6 +43,8 @@ public interface Transformer { * @param value * the string * @return the object + * @throws TransformException + * if any error occur while transforming */ - T untransform(String value); + T untransform(String value) throws TransformException; } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/ClassTransformer.java b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/ClassTransformer.java index 1fd831b3a..fc4f85388 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/ClassTransformer.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/ClassTransformer.java @@ -16,6 +16,7 @@ */ package com.l2jserver.util.transformer.impl; +import com.l2jserver.util.transformer.TransformException; import com.l2jserver.util.transformer.Transformer; /** @@ -39,7 +40,7 @@ public class ClassTransformer implements Transformer> { try { return Class.forName(value); } catch (ClassNotFoundException e) { - return null; + throw new TransformException(e); } } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/InetSocketAddressTransformer.java b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/InetSocketAddressTransformer.java index cffc89b90..e52a16a57 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/InetSocketAddressTransformer.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/InetSocketAddressTransformer.java @@ -18,6 +18,7 @@ package com.l2jserver.util.transformer.impl; import java.net.InetSocketAddress; +import com.l2jserver.util.transformer.TransformException; import com.l2jserver.util.transformer.Transformer; /** @@ -41,7 +42,7 @@ public class InetSocketAddressTransformer implements public InetSocketAddress untransform(String value) { final String[] pieces = value.split(":"); if (pieces.length != 2) - return null; + throw new TransformException("InetSocketAddress must have format ip:port"); return new InetSocketAddress(pieces[0], Integer.parseInt(pieces[1])); } diff --git a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/URLTransformer.java b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/URLTransformer.java index c6060aaf3..e7a900fae 100644 --- a/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/URLTransformer.java +++ b/l2jserver2-common/src/main/java/com/l2jserver/util/transformer/impl/URLTransformer.java @@ -20,6 +20,7 @@ import java.net.MalformedURLException; import java.net.URI; import java.net.URL; +import com.l2jserver.util.transformer.TransformException; import com.l2jserver.util.transformer.Transformer; /** @@ -43,7 +44,7 @@ public class URLTransformer implements Transformer { try { return new URL(value); } catch (MalformedURLException e) { - return null; + throw new TransformException(e); } } diff --git a/l2jserver2-gameserver/src/main/java/com/l2jserver/service/game/template/XMLTemplateService.java b/l2jserver2-gameserver/src/main/java/com/l2jserver/service/game/template/XMLTemplateService.java index b95913b5a..9691668f1 100644 --- a/l2jserver2-gameserver/src/main/java/com/l2jserver/service/game/template/XMLTemplateService.java +++ b/l2jserver2-gameserver/src/main/java/com/l2jserver/service/game/template/XMLTemplateService.java @@ -56,7 +56,7 @@ import com.l2jserver.service.cache.Cache; import com.l2jserver.service.cache.CacheService; import com.l2jserver.service.configuration.ConfigurationService; import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationName; -import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertiesKey; +import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertyKey; import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath; import com.l2jserver.service.core.LoggingService; import com.l2jserver.service.core.vfs.VFSService; @@ -147,7 +147,7 @@ public class XMLTemplateService extends AbstractService implements * @return the directory in which templates are stored */ @ConfigurationPropertyGetter(defaultValue = "data/template") - @ConfigurationPropertiesKey("template.directory") + @ConfigurationPropertyKey("template.directory") @ConfigurationXPath("/configuration/services/template/directory") URI getTemplateDirectory(); @@ -156,7 +156,7 @@ public class XMLTemplateService extends AbstractService implements * the directory in which templates are stored */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("template.directory") + @ConfigurationPropertyKey("template.directory") @ConfigurationXPath("/configuration/services/template/directory") void setTemplateDirectory(URI file); } diff --git a/l2jserver2-gameserver/src/main/java/com/l2jserver/service/network/NetworkService.java b/l2jserver2-gameserver/src/main/java/com/l2jserver/service/network/NetworkService.java index 22d306835..4b27feaa9 100644 --- a/l2jserver2-gameserver/src/main/java/com/l2jserver/service/network/NetworkService.java +++ b/l2jserver2-gameserver/src/main/java/com/l2jserver/service/network/NetworkService.java @@ -28,7 +28,7 @@ import com.l2jserver.service.Service; import com.l2jserver.service.ServiceConfiguration; import com.l2jserver.service.configuration.Configuration; import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationName; -import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertiesKey; +import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertyKey; import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath; /** @@ -81,7 +81,7 @@ public interface NetworkService extends Service { * @return the listen address */ @ConfigurationPropertyGetter(defaultValue = "0.0.0.0:7777") - @ConfigurationPropertiesKey("network.listen") + @ConfigurationPropertyKey("network.listen") @ConfigurationXPath("/configuration/services/network/listen") InetSocketAddress getListenAddress(); @@ -92,7 +92,7 @@ public interface NetworkService extends Service { * the listen address */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("network.listen") + @ConfigurationPropertyKey("network.listen") @ConfigurationXPath("/configuration/services/network/listen") void setListenAddress(InetSocketAddress addr); } diff --git a/l2jserver2-loginserver/src/main/java/com/l2jserver/service/gameserver/GameServerNetworkService.java b/l2jserver2-loginserver/src/main/java/com/l2jserver/service/gameserver/GameServerNetworkService.java index cb61c883b..a02b6ccd9 100644 --- a/l2jserver2-loginserver/src/main/java/com/l2jserver/service/gameserver/GameServerNetworkService.java +++ b/l2jserver2-loginserver/src/main/java/com/l2jserver/service/gameserver/GameServerNetworkService.java @@ -22,7 +22,7 @@ import com.l2jserver.service.Service; import com.l2jserver.service.ServiceConfiguration; import com.l2jserver.service.configuration.Configuration; import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationName; -import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertiesKey; +import com.l2jserver.service.configuration.ProxyConfigurationService.ConfigurationPropertyKey; import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath; /** @@ -44,7 +44,7 @@ public interface GameServerNetworkService extends Service { * @return the listen address */ @ConfigurationPropertyGetter(defaultValue = "0.0.0.0:2104") - @ConfigurationPropertiesKey("network.listen") + @ConfigurationPropertyKey("network.listen") @ConfigurationXPath("/configuration/services/network/listen") InetSocketAddress getListenAddress(); @@ -55,7 +55,7 @@ public interface GameServerNetworkService extends Service { * the listen address */ @ConfigurationPropertySetter - @ConfigurationPropertiesKey("network.listen") + @ConfigurationPropertyKey("network.listen") @ConfigurationXPath("/configuration/services/network/listen") void setListenAddress(InetSocketAddress addr); }