本文整理汇总了Java中net.sf.freecol.server.control.ServerInputHandler类的典型用法代码示例。如果您正苦于以下问题:Java ServerInputHandler类的具体用法?Java ServerInputHandler怎么用?Java ServerInputHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServerInputHandler类属于net.sf.freecol.server.control包,在下文中一共展示了ServerInputHandler类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FreeColServer
import net.sf.freecol.server.control.ServerInputHandler; //导入依赖的package包/类
/**
* Base constructor common to the following new-game and
* saved-game constructors.
*
* @param name An optional name for the server.
* @param port The TCP port to use for the public socket.
*/
private FreeColServer(String name, int port) throws IOException {
this.name = name;
this.server = createServer(port); // Throws IOException
this.server.start();
this.userConnectionHandler = new UserConnectionHandler(this);
this.preGameController = new PreGameController(this);
this.inGameController = new InGameController(this);
this.inputHandler = new ServerInputHandler(this);
}
示例2: getInputHandler
import net.sf.freecol.server.control.ServerInputHandler; //导入依赖的package包/类
/**
* Get the current input handler.
*
* @return The {@code ServerInputHandler} for the current server state.
*/
public ServerInputHandler getInputHandler() {
switch (this.serverState) {
case PRE_GAME: case LOAD_GAME: case IN_GAME:
return this.inputHandler;
default:
break;
}
return null;
}