Package net.sphene.goim.serverbrowser.models

Source Code of net.sphene.goim.serverbrowser.models.GameServer

/*
* File    : GameServer.java
* Created : 25.02.2006
* By      : kahless
*
* GOIM - Gamers Own Instant Messenger
* Copyright (C) 2005-2006 Herbert Poul
*              (JabberId: kahless@sphene.net / Email: herbert.poul@gmail.com)
* http://goim.sphene.net
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
package net.sphene.goim.serverbrowser.models;

import java.net.InetSocketAddress;

import net.sphene.goim.rcp.extensionpoints.GameExtensionPoint;
import net.sphene.goim.rcp.extensionpoints.GameExtensionPoint.GameExtensionProxy;
import net.sphene.goim.rcp.extensionpoints.game.GameAdapterWithServerName.ServerQueryInformation;
import net.sphene.libs.SpheneAbstractItem;
import net.sphene.libs.SpheneEvent;

/**
* This class represents one GameServer. since it inherits all from
* {@link net.sphene.libs.SpheneAbstractItem} you can add listeners which
* will be notified if any data changes.
*/
public class GameServer extends SpheneAbstractItem {
  public String gameid;
  public InetSocketAddress address;
  public String name;
  public String mapname;
  public int ping = -1;
  public String password;
 
  protected transient GameExtensionProxy gameExtension;
  public ServerQueryInformation lastQuery;
 
  public GameExtensionProxy getGameExtension() {
    if(gameExtension != null) return gameExtension;
    return gameExtension = GameExtensionPoint.getGameExtension(gameid);
  }

  public void fireChangeEvent() {
    fireEvent(new SpheneEvent(this));
  }
}
TOP

Related Classes of net.sphene.goim.serverbrowser.models.GameServer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.