Codota Logo
ServerMessage$ServerInfo.getState
Code IndexAdd Codota to your IDE (free)

How to use
getState
method
in
com.jzy.game.message.ServerMessage$ServerInfo

Best Java code snippets using com.jzy.game.message.ServerMessage$ServerInfo.getState (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: jzyong/game-server

server.setName(info.getName());
server.setHttpPort(server.getHttpPort());
server.setState(info.getState());
server.setType(info.getType());
server.setWwwip(info.getWwwip());
origin: jzyong/game-server

/**
 * 更新大厅服务器信息
 * 
 * @param info
 */
public void updateHallServerInfo(ServerMessage.ServerInfo info) {
  ServerInfo serverInfo = serverMap.get(info.getId());
  if (serverInfo == null) {
    serverInfo = getServerInfo(info);
    addTcpClient(serverInfo, NetPort.GATE_GAME_PORT, new MutilConHallHandler(serverInfo, this)); 
  } else {
    serverInfo.setIp(info.getIp());
    serverInfo.setId(info.getId());
    serverInfo.setPort(info.getPort());
    serverInfo.setState(info.getState());
    serverInfo.setOnline(info.getOnline());
    serverInfo.setMaxUserCount(info.getMaxUserCount());
    serverInfo.setName(info.getName());
    serverInfo.setHttpPort(info.getHttpport());
    serverInfo.setWwwip(info.getWwwip());
  }
  serverMap.put(info.getId(), serverInfo);
}
origin: jzyong/game-server

/**
 * 更新可用网关服务器信息
 * 
 * @param info
 */
public void updateGateServerInfo(ServerMessage.ServerInfo info) {
  ServerInfo serverInfo = getBydr2GateClient().getServers().get(info.getId());
  if (serverInfo == null) {
    serverInfo = getServerInfo(info);
    if(getBydr2GateClient() instanceof Bydr2GateClient){
      Bydr2GateClient service=(Bydr2GateClient)getBydr2GateClient();
      service.addTcpClient(serverInfo, NetPort.GATE_GAME_PORT,service.new MutilConHallHandler(serverInfo, service)); // TODO 暂时,网关服有多个tcp端口
    }else{
      getBydr2GateClient().addTcpClient(serverInfo,  NetPort.GATE_GAME_PORT);
    }
  } else {
    serverInfo.setIp(info.getIp());
    serverInfo.setId(info.getId());
    serverInfo.setPort(info.getPort());
    serverInfo.setState(info.getState());
    serverInfo.setOnline(info.getOnline());
    serverInfo.setMaxUserCount(info.getMaxUserCount());
    serverInfo.setName(info.getName());
    serverInfo.setHttpPort(info.getHttpport());
    serverInfo.setWwwip(info.getWwwip());
  }
  getBydr2GateClient().getServers().put(info.getId(), serverInfo);
}
origin: jzyong/game-server

private ServerInfo getServerInfo(ServerMessage.ServerInfo info) {
  ServerInfo serverInfo = new ServerInfo();
  serverInfo.setIp(info.getIp());
  serverInfo.setId(info.getId());
  serverInfo.setPort(info.getPort());
  serverInfo.setState(info.getState());
  serverInfo.setOnline(info.getOnline());
  serverInfo.setMaxUserCount(info.getMaxUserCount());
  serverInfo.setName(info.getName());
  serverInfo.setHttpPort(info.getHttpport());
  serverInfo.setWwwip(info.getWwwip());
  return serverInfo;
}
origin: jzyong/game-server

/**
 * 消息转换
 * @author JiangZhiYong
 * @QQ 359135103
 * 2017年8月29日 下午2:21:52
 * @param info
 * @return
 */
private ServerInfo getServerInfo(ServerMessage.ServerInfo info) {
  ServerInfo serverInfo = new ServerInfo();
  serverInfo.setIp(info.getIp());
  serverInfo.setId(info.getId());
  serverInfo.setPort(info.getPort());
  serverInfo.setState(info.getState());
  serverInfo.setOnline(info.getOnline());
  serverInfo.setMaxUserCount(info.getMaxUserCount());
  serverInfo.setName(info.getName());
  serverInfo.setHttpPort(info.getHttpport());
  serverInfo.setWwwip(info.getWwwip());
  serverInfo.setFreeMemory(info.getFreeMemory());
  serverInfo.setTotalMemory(info.getTotalMemory());
  serverInfo.setVersion(info.getVersion());
  return serverInfo;
}
origin: jzyong/game-server

setState(other.getState());
com.jzy.game.messageServerMessage$ServerInfogetState

Javadoc

optional int32 state = 5;
 
状态 -1表示维护;0表示准备开启;1表示正常,2表示不显示,3表示内部开启 

Popular methods of ServerMessage$ServerInfo

  • getId
    required int32 id = 1; 服务器ID
  • getIp
    optional string ip = 2; 内网地址
  • getMaxUserCount
    optional int32 maxUserCount = 7; 在线人数
  • getName
    optional string name = 9; 名字
  • getOnline
    optional int32 online = 6; 在线人数
  • getPort
    optional int32 port = 4; 端口
  • getWwwip
    optional string wwwip = 10; 外网地址
  • newBuilder
  • getHttpport
    optional int32 httpport = 8; http端口
  • getFreeMemory
    optional int32 freeMemory = 11; 空闲内存
  • getTotalMemory
    optional int32 totalMemory = 12; 可用内存
  • getType
    optional int32 type = 3; 类型
  • getTotalMemory,
  • getType,
  • getVersion,
  • <init>,
  • getDefaultInstance,
  • getIpBytes,
  • getNameBytes,
  • getSerializedSize,
  • getUnknownFields

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now