sessionservicermi.java
来自「Java mulitplayer strategy game. Adaptati」· Java 代码 · 共 63 行
JAVA
63 行
/*
* SessionServiceRMI.java
*
* Created on 17 pa焏ziernik 2005, 20:45
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package net.sf.jawp.gf.api.services.rmi;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Collection;
import net.sf.jawp.gf.api.domain.GameOptions;
import net.sf.jawp.gf.api.domain.GameWorld;
import net.sf.jawp.gf.api.domain.Player;
import net.sf.jawp.gf.api.domain.User;
/**
*
* @author jarek
* @param <GAMESERVICE> native game service *
*/
public interface SessionServiceRMI<GAMESERVICE> extends Remote
{
User getLoggedUser() throws RemoteException;
GameWorld createGame(final String name, final GameOptions options) throws RemoteException;
/**
* lists available games
* @return available games.
*/
Collection<GameWorld> getGames() throws RemoteException;
/**
* joins as new player
* @return
*/
Player joinGame(final long gameKey ) throws RemoteException;
void quitGame(final long gameKey, final long playerKey) throws RemoteException;
/**
* retrieves all players for current user
* @return
*/
Collection<Player> getUserPlayersForGame(final long gameKey) throws RemoteException;
/**
* retrieves native game service for given keys
* @param gameKey
* @param playerKey
* @return
*/
Remote getGameServiceRemote( final long gameKey, final long playerKey ) throws RemoteException;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?