mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-05 23:22:47 +00:00
Removes loginserver deprecated classes and improves javadoc
This commit is contained in:
@@ -77,6 +77,9 @@ public class ServiceManager {
|
|||||||
.newMap();
|
.newMap();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Loads an service descriptor XML file in order to bind XML services to the
|
||||||
|
* server runtime.
|
||||||
|
*
|
||||||
* @param file
|
* @param file
|
||||||
* the XML file
|
* the XML file
|
||||||
* @throws SAXException
|
* @throws SAXException
|
||||||
@@ -121,7 +124,7 @@ public class ServiceManager {
|
|||||||
* Initializes the service manager
|
* Initializes the service manager
|
||||||
*
|
*
|
||||||
* @param injector
|
* @param injector
|
||||||
* the injector instance
|
* the {@link Injector} instance
|
||||||
* @throws ServiceStartException
|
* @throws ServiceStartException
|
||||||
* if any error occur while starting logging or configuration
|
* if any error occur while starting logging or configuration
|
||||||
* service
|
* service
|
||||||
@@ -150,6 +153,10 @@ public class ServiceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the ServiceDescriptor binded to <code>serviceClass</code>. If no
|
||||||
|
* implementation of <code>serviceClass</code>, <code>null</code> is
|
||||||
|
* returned.
|
||||||
|
*
|
||||||
* @param serviceClass
|
* @param serviceClass
|
||||||
* the service class
|
* the service class
|
||||||
* @return the {@link ServiceDescriptor} for the requested service
|
* @return the {@link ServiceDescriptor} for the requested service
|
||||||
@@ -273,13 +280,13 @@ public class ServiceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a {@link Set} of all dependecies to be stopped
|
* Creates a {@link Set} of all dependencies to be stopped
|
||||||
*
|
*
|
||||||
* @param depends
|
* @param depends
|
||||||
* the service
|
* the service
|
||||||
* @param serviceClass
|
* @param serviceClass
|
||||||
* the service class
|
* the service class
|
||||||
* @return the {@link Set} of all depedendecies to be stopped
|
* @return the {@link Set} of all dependencies to be stopped
|
||||||
*/
|
*/
|
||||||
private Set<Class<? extends Service>> createStopDependencies(
|
private Set<Class<? extends Service>> createStopDependencies(
|
||||||
Set<Class<? extends Service>> depends, Service serviceClass) {
|
Set<Class<? extends Service>> depends, Service serviceClass) {
|
||||||
|
|||||||
@@ -999,6 +999,7 @@ public abstract class AbstractSQLDatabaseService extends
|
|||||||
object = mapper.select(entity,
|
object = mapper.select(entity,
|
||||||
new SQLDatabaseRow(results.get(0), entity));
|
new SQLDatabaseRow(results.get(0), entity));
|
||||||
updateCache(object, database);
|
updateCache(object, database);
|
||||||
|
updateDesire(object, ObjectDesire.INSERT);
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
} else {
|
} else {
|
||||||
@@ -1047,6 +1048,7 @@ public abstract class AbstractSQLDatabaseService extends
|
|||||||
if (object == null) {
|
if (object == null) {
|
||||||
object = mapper.select(entity, row);
|
object = mapper.select(entity, row);
|
||||||
updateCache(object, database);
|
updateCache(object, database);
|
||||||
|
updateDesire(object, ObjectDesire.INSERT);
|
||||||
}
|
}
|
||||||
if (object != null)
|
if (object != null)
|
||||||
objects.add(object);
|
objects.add(object);
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.l2jserver;
|
|
||||||
|
|
||||||
import com.google.inject.Guice;
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
|
|
||||||
public class L2JLoginServer {
|
|
||||||
private final Injector injector = Guice
|
|
||||||
.createInjector(new LoginServerModule());
|
|
||||||
|
|
||||||
public Injector getInjector() {
|
|
||||||
return injector;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package com.l2jserver;
|
|
||||||
|
|
||||||
public class LoginServerMain {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// final L2JLoginServer server = new L2JLoginServer();
|
|
||||||
// TODO initilization
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package com.l2jserver;
|
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import com.l2jserver.service.ServiceModule;
|
|
||||||
|
|
||||||
public class LoginServerModule extends AbstractModule {
|
|
||||||
@Override
|
|
||||||
protected void configure() {
|
|
||||||
install(new ServiceModule());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.l2jserver.game.net;
|
|
||||||
|
|
||||||
import org.jboss.netty.channel.ChannelPipeline;
|
|
||||||
import org.jboss.netty.channel.ChannelPipelineFactory;
|
|
||||||
import static org.jboss.netty.channel.Channels.*;
|
|
||||||
|
|
||||||
public class Lineage2LSChannelPipelineFactory implements ChannelPipelineFactory {
|
|
||||||
@Override
|
|
||||||
public ChannelPipeline getPipeline() throws Exception {
|
|
||||||
final ChannelPipeline pipeline = pipeline();
|
|
||||||
|
|
||||||
pipeline.addLast("", null);
|
|
||||||
|
|
||||||
return pipeline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.l2jserver.game.net.codec;
|
|
||||||
|
|
||||||
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
|
|
||||||
|
|
||||||
public class Lineage2LSFrameDecoder extends LengthFieldBasedFrameDecoder {
|
|
||||||
public Lineage2LSFrameDecoder() {
|
|
||||||
super(16 * 1024, 0, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.l2jserver.game.net.codec;
|
|
||||||
|
|
||||||
import org.jboss.netty.handler.codec.frame.LengthFieldPrepender;
|
|
||||||
|
|
||||||
public class Lineage2LSFrameEncoder extends LengthFieldPrepender {
|
|
||||||
public Lineage2LSFrameEncoder() {
|
|
||||||
super(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
package com.l2jserver.ls.net;
|
|
||||||
|
|
||||||
import static org.jboss.netty.channel.Channels.pipeline;
|
|
||||||
|
|
||||||
import org.jboss.netty.channel.ChannelPipeline;
|
|
||||||
import org.jboss.netty.channel.ChannelPipelineFactory;
|
|
||||||
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
|
|
||||||
import org.jboss.netty.handler.codec.frame.LengthFieldPrepender;
|
|
||||||
|
|
||||||
import com.l2jserver.service.gameserver.GameServerNetworkService;
|
|
||||||
|
|
||||||
public class LoginServerChannelPipelineFactory implements
|
|
||||||
ChannelPipelineFactory {
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private final GameServerNetworkService networkService;
|
|
||||||
|
|
||||||
public LoginServerChannelPipelineFactory(
|
|
||||||
GameServerNetworkService networkService) {
|
|
||||||
this.networkService = networkService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChannelPipeline getPipeline() throws Exception {
|
|
||||||
final ChannelPipeline pipeline = pipeline();
|
|
||||||
|
|
||||||
// pipeline.addLast("ssl", new SslHandler());
|
|
||||||
pipeline.addLast("frameEncoder", new LengthFieldPrepender(4));
|
|
||||||
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(
|
|
||||||
1048576, 0, 4, 0, 4));
|
|
||||||
|
|
||||||
// pipeline.addLast("encoder", new ObjectEncoder());
|
|
||||||
// pipeline.addLast("decoder", new ObjectDecoder());
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.l2jserver.ls.net;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public interface Message extends Serializable {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.l2jserver.ls.net.handler;
|
|
||||||
|
|
||||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
|
||||||
import org.jboss.netty.channel.ChannelStateEvent;
|
|
||||||
import org.jboss.netty.channel.MessageEvent;
|
|
||||||
import org.jboss.netty.channel.SimpleChannelHandler;
|
|
||||||
|
|
||||||
public class ServiceHandler extends SimpleChannelHandler {
|
|
||||||
@Override
|
|
||||||
public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e)
|
|
||||||
throws Exception {
|
|
||||||
|
|
||||||
super.channelConnected(ctx, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
|
|
||||||
throws Exception {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
super.messageReceived(ctx, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
public class AuthRequestMessage implements Message {
|
|
||||||
private static final long serialVersionUID = -1983769628118961790L;
|
|
||||||
|
|
||||||
private int id;
|
|
||||||
private boolean acceptAlternate;
|
|
||||||
private byte[] hexid;
|
|
||||||
private int port;
|
|
||||||
private boolean reserveHost;
|
|
||||||
private int maxplayer;
|
|
||||||
private String[] subnets;
|
|
||||||
private String[] hosts;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the id
|
|
||||||
*/
|
|
||||||
public int getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param id
|
|
||||||
* the id to set
|
|
||||||
*/
|
|
||||||
public void setId(int id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the acceptAlternate
|
|
||||||
*/
|
|
||||||
public boolean isAcceptAlternate() {
|
|
||||||
return acceptAlternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param acceptAlternate
|
|
||||||
* the acceptAlternate to set
|
|
||||||
*/
|
|
||||||
public void setAcceptAlternate(boolean acceptAlternate) {
|
|
||||||
this.acceptAlternate = acceptAlternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the hexid
|
|
||||||
*/
|
|
||||||
public byte[] getHexid() {
|
|
||||||
return hexid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param hexid
|
|
||||||
* the hexid to set
|
|
||||||
*/
|
|
||||||
public void setHexid(byte[] hexid) {
|
|
||||||
this.hexid = hexid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the port
|
|
||||||
*/
|
|
||||||
public int getPort() {
|
|
||||||
return port;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param port
|
|
||||||
* the port to set
|
|
||||||
*/
|
|
||||||
public void setPort(int port) {
|
|
||||||
this.port = port;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the reserveHost
|
|
||||||
*/
|
|
||||||
public boolean isReserveHost() {
|
|
||||||
return reserveHost;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param reserveHost
|
|
||||||
* the reserveHost to set
|
|
||||||
*/
|
|
||||||
public void setReserveHost(boolean reserveHost) {
|
|
||||||
this.reserveHost = reserveHost;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the maxplayer
|
|
||||||
*/
|
|
||||||
public int getMaxplayer() {
|
|
||||||
return maxplayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param maxplayer
|
|
||||||
* the maxplayer to set
|
|
||||||
*/
|
|
||||||
public void setMaxplayer(int maxplayer) {
|
|
||||||
this.maxplayer = maxplayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the subnets
|
|
||||||
*/
|
|
||||||
public String[] getSubnets() {
|
|
||||||
return subnets;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param subnets
|
|
||||||
* the subnets to set
|
|
||||||
*/
|
|
||||||
public void setSubnets(String[] subnets) {
|
|
||||||
this.subnets = subnets;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the hosts
|
|
||||||
*/
|
|
||||||
public String[] getHosts() {
|
|
||||||
return hosts;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param hosts
|
|
||||||
* the hosts to set
|
|
||||||
*/
|
|
||||||
public void setHosts(String[] hosts) {
|
|
||||||
this.hosts = hosts;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class AuthResponseMessage implements Message {
|
|
||||||
private static final long serialVersionUID = -8422461240360413638L;
|
|
||||||
|
|
||||||
private int serverId;
|
|
||||||
private String serverName;
|
|
||||||
|
|
||||||
public AuthResponseMessage() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getServerId() {
|
|
||||||
return serverId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServerId(int serverId) {
|
|
||||||
this.serverId = serverId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getServerName() {
|
|
||||||
return serverName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServerName(String serverName) {
|
|
||||||
this.serverName = serverName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ChangeAccessLevelMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 3955787866005767089L;
|
|
||||||
|
|
||||||
private String player;
|
|
||||||
private int access;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the player
|
|
||||||
*/
|
|
||||||
public String getPlayer() {
|
|
||||||
return player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param player
|
|
||||||
* the player to set
|
|
||||||
*/
|
|
||||||
public void setPlayer(String player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the access
|
|
||||||
*/
|
|
||||||
public int getAccess() {
|
|
||||||
return access;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param access
|
|
||||||
* the access to set
|
|
||||||
*/
|
|
||||||
public void setAccess(int access) {
|
|
||||||
this.access = access;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
public class InitLSMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 6277036140453399066L;
|
|
||||||
|
|
||||||
private int rev;
|
|
||||||
private byte[] key;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the rev
|
|
||||||
*/
|
|
||||||
public int getRev() {
|
|
||||||
return rev;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param rev
|
|
||||||
* the rev to set
|
|
||||||
*/
|
|
||||||
public void setRev(int rev) {
|
|
||||||
this.rev = rev;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the key
|
|
||||||
*/
|
|
||||||
public byte[] getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param key
|
|
||||||
* the key to set
|
|
||||||
*/
|
|
||||||
public void setKey(byte[] key) {
|
|
||||||
this.key = key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
public class KickPlayerMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 6409419918667594810L;
|
|
||||||
|
|
||||||
private String account;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the account
|
|
||||||
*/
|
|
||||||
public String getAccount() {
|
|
||||||
return account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param account
|
|
||||||
* the account to set
|
|
||||||
*/
|
|
||||||
public void setAccount(String account) {
|
|
||||||
this.account = account;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
public class LoginServerFailMessage implements Message {
|
|
||||||
private static final long serialVersionUID = -4031976482500361984L;
|
|
||||||
|
|
||||||
private static final String[] REASONS = { "None", "Reason: ip banned",
|
|
||||||
"Reason: ip reserved", "Reason: wrong hexid",
|
|
||||||
"Reason: id reserved", "Reason: no free ID", "Not authed",
|
|
||||||
"Reason: already logged in" };
|
|
||||||
private int reason;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the reason
|
|
||||||
*/
|
|
||||||
public int getReason() {
|
|
||||||
return reason;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the reason
|
|
||||||
*/
|
|
||||||
public String getReasonAsString() {
|
|
||||||
return REASONS[reason];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param reason
|
|
||||||
* the reason to set
|
|
||||||
*/
|
|
||||||
public void setReason(int reason) {
|
|
||||||
this.reason = reason;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class PlayerAuthRequestMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 4583147564841961379L;
|
|
||||||
|
|
||||||
private String account;
|
|
||||||
private int playOkId1;
|
|
||||||
private int playOkId2;
|
|
||||||
private int loginOkId1;
|
|
||||||
private int loginOkId2;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the account
|
|
||||||
*/
|
|
||||||
public String getAccount() {
|
|
||||||
return account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param account
|
|
||||||
* the account to set
|
|
||||||
*/
|
|
||||||
public void setAccount(String account) {
|
|
||||||
this.account = account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the playOkId1
|
|
||||||
*/
|
|
||||||
public int getPlayOkId1() {
|
|
||||||
return playOkId1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param playOkId1
|
|
||||||
* the playOkId1 to set
|
|
||||||
*/
|
|
||||||
public void setPlayOkId1(int playOkId1) {
|
|
||||||
this.playOkId1 = playOkId1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the playOkId2
|
|
||||||
*/
|
|
||||||
public int getPlayOkId2() {
|
|
||||||
return playOkId2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param playOkId2
|
|
||||||
* the playOkId2 to set
|
|
||||||
*/
|
|
||||||
public void setPlayOkId2(int playOkId2) {
|
|
||||||
this.playOkId2 = playOkId2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the loginOkId1
|
|
||||||
*/
|
|
||||||
public int getLoginOkId1() {
|
|
||||||
return loginOkId1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param loginOkId1
|
|
||||||
* the loginOkId1 to set
|
|
||||||
*/
|
|
||||||
public void setLoginOkId1(int loginOkId1) {
|
|
||||||
this.loginOkId1 = loginOkId1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the loginOkId2
|
|
||||||
*/
|
|
||||||
public int getLoginOkId2() {
|
|
||||||
return loginOkId2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param loginOkId2
|
|
||||||
* the loginOkId2 to set
|
|
||||||
*/
|
|
||||||
public void setLoginOkId2(int loginOkId2) {
|
|
||||||
this.loginOkId2 = loginOkId2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class PlayerAuthResponseMessage implements Message {
|
|
||||||
private static final long serialVersionUID = -2769385090218023613L;
|
|
||||||
|
|
||||||
private String account;
|
|
||||||
private boolean authed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the account
|
|
||||||
*/
|
|
||||||
public String getAccount() {
|
|
||||||
return account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param account
|
|
||||||
* the account to set
|
|
||||||
*/
|
|
||||||
public void setAccount(String account) {
|
|
||||||
this.account = account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the authed
|
|
||||||
*/
|
|
||||||
public boolean isAuthed() {
|
|
||||||
return authed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param authed
|
|
||||||
* the authed to set
|
|
||||||
*/
|
|
||||||
public void setAuthed(boolean authed) {
|
|
||||||
this.authed = authed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class PlayerInGameMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 636969531052790109L;
|
|
||||||
|
|
||||||
private String player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the player
|
|
||||||
*/
|
|
||||||
public String getPlayer() {
|
|
||||||
return player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param player
|
|
||||||
* the player to set
|
|
||||||
*/
|
|
||||||
public void setPlayer(String player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class PlayerLogoutMessage implements Message {
|
|
||||||
private static final long serialVersionUID = -5088785875080568929L;
|
|
||||||
|
|
||||||
private String player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the player
|
|
||||||
*/
|
|
||||||
public String getPlayer() {
|
|
||||||
return player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param player
|
|
||||||
* the player to set
|
|
||||||
*/
|
|
||||||
public void setPlayer(String player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author mrTJO
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class PlayerTracertMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 5148890222662873608L;
|
|
||||||
|
|
||||||
private String account;
|
|
||||||
private String pcIp;
|
|
||||||
private String hop1;
|
|
||||||
private String hop2;
|
|
||||||
private String hop3;
|
|
||||||
private String hop4;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the account
|
|
||||||
*/
|
|
||||||
public String getAccount() {
|
|
||||||
return account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param account
|
|
||||||
* the account to set
|
|
||||||
*/
|
|
||||||
public void setAccount(String account) {
|
|
||||||
this.account = account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the pcIp
|
|
||||||
*/
|
|
||||||
public String getPcIp() {
|
|
||||||
return pcIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param pcIp
|
|
||||||
* the pcIp to set
|
|
||||||
*/
|
|
||||||
public void setPcIp(String pcIp) {
|
|
||||||
this.pcIp = pcIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the hop1
|
|
||||||
*/
|
|
||||||
public String getHop1() {
|
|
||||||
return hop1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param hop1
|
|
||||||
* the hop1 to set
|
|
||||||
*/
|
|
||||||
public void setHop1(String hop1) {
|
|
||||||
this.hop1 = hop1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the hop2
|
|
||||||
*/
|
|
||||||
public String getHop2() {
|
|
||||||
return hop2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param hop2
|
|
||||||
* the hop2 to set
|
|
||||||
*/
|
|
||||||
public void setHop2(String hop2) {
|
|
||||||
this.hop2 = hop2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the hop3
|
|
||||||
*/
|
|
||||||
public String getHop3() {
|
|
||||||
return hop3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param hop3
|
|
||||||
* the hop3 to set
|
|
||||||
*/
|
|
||||||
public void setHop3(String hop3) {
|
|
||||||
this.hop3 = hop3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the hop4
|
|
||||||
*/
|
|
||||||
public String getHop4() {
|
|
||||||
return hop4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param hop4
|
|
||||||
* the hop4 to set
|
|
||||||
*/
|
|
||||||
public void setHop4(String hop4) {
|
|
||||||
this.hop4 = hop4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
/*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.l2jserver.ls.net.message;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.l2jserver.ls.net.Message;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author -Wooden-
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ServerStatusMessage implements Message {
|
|
||||||
private static final long serialVersionUID = 251392846109402522L;
|
|
||||||
|
|
||||||
private ArrayList<Attribute> attributes;
|
|
||||||
|
|
||||||
public static final String[] STATUS_STRING = { "Auto", "Good", "Normal",
|
|
||||||
"Full", "Down", "Gm Only" };
|
|
||||||
|
|
||||||
public static final int SERVER_LIST_STATUS = 0x01;
|
|
||||||
public static final int SERVER_TYPE = 0x02;
|
|
||||||
public static final int SERVER_LIST_SQUARE_BRACKET = 0x03;
|
|
||||||
public static final int MAX_PLAYERS = 0x04;
|
|
||||||
public static final int SERVER_AGE = 0x05;
|
|
||||||
|
|
||||||
// Server Status
|
|
||||||
public static final int STATUS_AUTO = 0x00;
|
|
||||||
public static final int STATUS_GOOD = 0x01;
|
|
||||||
public static final int STATUS_NORMAL = 0x02;
|
|
||||||
public static final int STATUS_FULL = 0x03;
|
|
||||||
public static final int STATUS_DOWN = 0x04;
|
|
||||||
public static final int STATUS_GM_ONLY = 0x05;
|
|
||||||
|
|
||||||
// Server Types
|
|
||||||
public static final int SERVER_NORMAL = 0x01;
|
|
||||||
public static final int SERVER_RELAX = 0x02;
|
|
||||||
public static final int SERVER_TEST = 0x04;
|
|
||||||
public static final int SERVER_NOLABEL = 0x08;
|
|
||||||
public static final int SERVER_CREATION_RESTRICTED = 0x10;
|
|
||||||
public static final int SERVER_EVENT = 0x20;
|
|
||||||
public static final int SERVER_FREE = 0x40;
|
|
||||||
|
|
||||||
// Server Ages
|
|
||||||
public static final int SERVER_AGE_ALL = 0x00;
|
|
||||||
public static final int SERVER_AGE_15 = 0x0F;
|
|
||||||
public static final int SERVER_AGE_18 = 0x12;
|
|
||||||
|
|
||||||
public static final int ON = 0x01;
|
|
||||||
public static final int OFF = 0x00;
|
|
||||||
|
|
||||||
public static class Attribute {
|
|
||||||
public int id;
|
|
||||||
public int value;
|
|
||||||
|
|
||||||
Attribute(int pId, int pValue) {
|
|
||||||
id = pId;
|
|
||||||
value = pValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the attributes
|
|
||||||
*/
|
|
||||||
public ArrayList<Attribute> getAttributes() {
|
|
||||||
return attributes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param attributes
|
|
||||||
* the attributes to set
|
|
||||||
*/
|
|
||||||
public void setAttributes(ArrayList<Attribute> attributes) {
|
|
||||||
this.attributes = attributes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.l2jserver.service;
|
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import com.google.inject.Scopes;
|
|
||||||
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.database.DatabaseService;
|
|
||||||
import com.l2jserver.service.database.LoginServerSQLDatabaseService;
|
|
||||||
|
|
||||||
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(ConfigurationService.class).to(XMLConfigurationService.class)
|
|
||||||
.in(Scopes.SINGLETON);
|
|
||||||
bind(DatabaseService.class).to(LoginServerSQLDatabaseService.class)
|
|
||||||
.in(Scopes.SINGLETON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +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.database;
|
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Google Guice {@link Module} for H2 DAOs
|
|
||||||
*
|
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
|
||||||
*/
|
|
||||||
public class H2DAOModule extends AbstractModule {
|
|
||||||
@Override
|
|
||||||
protected void configure() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,74 +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.database;
|
|
||||||
|
|
||||||
import com.l2jserver.service.AbstractService.Depends;
|
|
||||||
import com.l2jserver.service.cache.CacheService;
|
|
||||||
import com.l2jserver.service.configuration.ConfigurationService;
|
|
||||||
import com.l2jserver.service.core.LoggingService;
|
|
||||||
import com.l2jserver.service.core.threading.ThreadService;
|
|
||||||
import com.l2jserver.service.core.vfs.VFSService;
|
|
||||||
import com.l2jserver.service.database.sql.AbstractSQLDatabaseService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is an implementation of {@link DatabaseService} that provides an layer
|
|
||||||
* to JDBC.
|
|
||||||
*
|
|
||||||
* <h1>Internal specification</h1> <h2>The
|
|
||||||
* {@link com.l2jserver.service.database.sql.AbstractSQLDatabaseService.Query
|
|
||||||
* Query} object</h2>
|
|
||||||
*
|
|
||||||
* If you wish to implement a new {@link DataAccessObject} you should try not
|
|
||||||
* use
|
|
||||||
* {@link com.l2jserver.service.database.sql.AbstractSQLDatabaseService.Query
|
|
||||||
* Query} object directly because it only provides low level access to the JDBC
|
|
||||||
* architecture. Instead, you could use an specialized class, like
|
|
||||||
* {@link com.l2jserver.service.database.sql.AbstractSQLDatabaseService.InsertQuery
|
|
||||||
* InsertUpdateQuery} ,
|
|
||||||
* {@link com.l2jserver.service.database.sql.AbstractSQLDatabaseService.SelectListQuery
|
|
||||||
* SelectListQuery} or
|
|
||||||
* {@link com.l2jserver.service.database.sql.AbstractSQLDatabaseService.SelectSingleQuery
|
|
||||||
* SelectSingleQuery} . If you do need low level access, feel free to use the
|
|
||||||
* {@link com.l2jserver.service.database.sql.AbstractSQLDatabaseService.Query
|
|
||||||
* Query} class directly.
|
|
||||||
*
|
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
|
||||||
*/
|
|
||||||
@Depends({ LoggingService.class, CacheService.class,
|
|
||||||
ConfigurationService.class, ThreadService.class })
|
|
||||||
public class LoginServerSQLDatabaseService extends AbstractSQLDatabaseService
|
|
||||||
implements DatabaseService {
|
|
||||||
/**
|
|
||||||
* @param cacheService
|
|
||||||
* the cache service
|
|
||||||
* @param threadService
|
|
||||||
* the thread service
|
|
||||||
* @param vfsService
|
|
||||||
* the vfs service
|
|
||||||
* @param daoResolver
|
|
||||||
* the {@link DataAccessObject DAO} resolver
|
|
||||||
*/
|
|
||||||
public LoginServerSQLDatabaseService(CacheService cacheService,
|
|
||||||
ThreadService threadService, VFSService vfsService,
|
|
||||||
DAOResolver daoResolver) {
|
|
||||||
super(cacheService, threadService, vfsService, daoResolver);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateSchemas() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +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.database;
|
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Google Guice {@link Module} for MySQL5 DAOs
|
|
||||||
*
|
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
|
||||||
*/
|
|
||||||
public class MySQL5DAOModule extends AbstractModule {
|
|
||||||
@Override
|
|
||||||
protected void configure() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +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.gameserver;
|
|
||||||
|
|
||||||
|
|
||||||
import com.l2jserver.service.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO
|
|
||||||
*
|
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
|
||||||
*/
|
|
||||||
public interface GameServerNetworkService extends Service {
|
|
||||||
}
|
|
||||||
@@ -1,51 +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.gameserver;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
|
|
||||||
import com.l2jserver.service.ServiceConfiguration;
|
|
||||||
import com.l2jserver.service.configuration.Configuration;
|
|
||||||
import com.l2jserver.service.configuration.Configuration.ConfigurationPropertyGetter;
|
|
||||||
import com.l2jserver.service.configuration.Configuration.ConfigurationPropertySetter;
|
|
||||||
import com.l2jserver.service.configuration.XMLConfigurationService.ConfigurationXPath;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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:2104")
|
|
||||||
@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);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user