本文整理匯總了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;
}