mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 13:19:18 -08:00
Some more changes to Server Console and Admin server handling.
This commit is contained in:
parent
e697cae98d
commit
c03dc6c2b5
13 changed files with 113 additions and 60 deletions
|
|
@ -28,7 +28,11 @@
|
|||
|
||||
package mage.remote;
|
||||
|
||||
import java.net.*;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InterfaceAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.SocketException;
|
||||
import java.util.Enumeration;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,8 +204,10 @@ public class SessionImpl implements Session {
|
|||
if (registerResult) {
|
||||
sessionState = SessionState.CONNECTED;
|
||||
serverState = server.getServerState();
|
||||
updateDatabase();
|
||||
logger.info("Connected as " + this.getUserName() == null ? "":this.getUserName() + " to MAGE server at " + connection.getHost() + ":" + connection.getPort());
|
||||
if (!connection.getUsername().equals("Admin")) {
|
||||
updateDatabase();
|
||||
}
|
||||
logger.info("Connected as " + (this.getUserName() == null ? "":this.getUserName()) + " to MAGE server at " + connection.getHost() + ":" + connection.getPort());
|
||||
client.connected(this.getUserName() == null ? "":this.getUserName() +"@" + connection.getHost() + ":" + connection.getPort() +" ");
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ import java.util.Date;
|
|||
*/
|
||||
public class UserView implements Serializable {
|
||||
|
||||
private String userName;
|
||||
private String host;
|
||||
private String sessionId;
|
||||
private Date timeConnected;
|
||||
private final String userName;
|
||||
private final String host;
|
||||
private final String sessionId;
|
||||
private final Date timeConnected;
|
||||
|
||||
public UserView(String userName, String host, String sessionId, Date timeConnected) {
|
||||
this.userName = userName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue