⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jawpgameservicermiimpl.java

📁 Java mulitplayer strategy game. Adaptation of KDE Galaxy Conquest. (rules are changed - but still th
💻 JAVA
字号:
package net.sf.jawp.game.service.rmi;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.Collection;

import net.sf.jawp.api.domain.BattleReportVO;
import net.sf.jawp.api.domain.Fleet;
import net.sf.jawp.api.domain.GameSpeed;
import net.sf.jawp.api.domain.Planet;
import net.sf.jawp.api.domain.Realm;
import net.sf.jawp.api.service.JAWPGameService;
import net.sf.jawp.api.service.rmi.JAWPGameServiceRMI;

/**
 * RMI implementation of jawp game service.
 * @author jarek
 * @version $Revision$
 *
 */
public final class JAWPGameServiceRMIImpl extends UnicastRemoteObject
implements JAWPGameServiceRMI
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private final JAWPGameService service;
	
	public JAWPGameServiceRMIImpl( final JAWPGameService srv)
	throws RemoteException
	{
		this.service = srv;
	}

	public Realm getRealm() throws RemoteException
	{
		return this.service.getRealm();
	}

	public Collection<Planet> getPlanets() throws RemoteException
	{
		return this.service.getPlanets();
	}

	public void moveFleet(final long fromPlanetKey, final long toPlanetKey, final int size) throws IllegalArgumentException
	{
		this.service.moveFleet( fromPlanetKey, toPlanetKey, size);
	}

	public Realm getOtherRealm(final long realmKey) throws RemoteException
	{
		return this.service.getOtherRealm( realmKey);
	}

	public Collection<Fleet> getOwnFleets() throws RemoteException
	{
		return this.service.getOwnFleets();
	}

	public GameSpeed getGameSpeed() throws RemoteException
	{
		return this.service.getGameSpeed();
	}

	/**
	 * {@inheritDoc}
	 */
	public Collection<BattleReportVO> getBattleReports() throws RemoteException
	{
		return this.service.getBattleReports();
	}
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -