当前位置: 首页>>代码示例>>Java>>正文


Java CubesServer类代码示例

本文整理汇总了Java中ethanjones.cubes.side.server.CubesServer的典型用法代码示例。如果您正苦于以下问题:Java CubesServer类的具体用法?Java CubesServer怎么用?Java CubesServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CubesServer类属于ethanjones.cubes.side.server包,在下文中一共展示了CubesServer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
@Override
public void setServer(CubesServer cubesServer) throws UnsupportedOperationException {
	// CubesSecurity.checkSetCubes();
	if (cubesServer != null) {
		if (cubesServer instanceof IntegratedServer) {
			this.cubesServer = (IntegratedServer) cubesServer;
			Log.debug("Server set");
			this.cubesServer.start();
		} else {
			Log.warning("Server can only be set to an IntegratedServer");
		}
	} else {
		this.cubesServer = null;
		Log.debug("Server set to null");
	}
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:17,代码来源:ClientAdapter.java

示例2: stop

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private static void stop() {
	final CubesClient cubesClient = adapter.getClient();
	final CubesServer cubesServer = adapter.getServer();
	final Thread currentThread = Thread.currentThread();

	if (!isDedicatedServer()) {
		if (Adapter.getInterface().getThread() == currentThread) {
			stopFromClientThread(cubesClient, cubesServer);
		} else if (cubesServer != null && cubesServer.getThread() == currentThread) {
			stopFromServerThread(cubesClient, cubesServer);
		} else {
			stopFromOtherThread(cubesClient, cubesServer);
		}
		throw new StopLoopException();
	} else {
		if (Adapter.getInterface().getThread() == currentThread) {
			stopFromServerThread(cubesClient, cubesServer);
		} else {
			stopFromOtherThread(cubesClient, cubesServer);
		}
	}
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:23,代码来源:Adapter.java

示例3: stopFromServerThread

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private static void stopFromServerThread(final CubesClient cubesClient, final CubesServer cubesServer) {
	try {
		if (cubesClient != null) {
			cubesClient.dispose();
		}
		if (cubesServer != null) {
			cubesServer.dispose();
		}
		// if (cubesClient != null) {
		// try {
		// cubesClient.getThread().join(JOIN_TIMEOUT);
		// } catch (InterruptedException e) {
		// }
		// if (cubesClient.getThread().isAlive()) {
		// failedToStopThread(cubesClient.getThread());
		// }
		// }
	} catch (Exception e) {
		Debug.crash(e);
	}
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:22,代码来源:Adapter.java

示例4: setServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
@Override
public void setServer(CubesServer cubesServer) throws UnsupportedOperationException {
  //CubesSecurity.checkSetCubes();
  if (cubesServer != null) {
    if (cubesServer instanceof IntegratedServer) {
      this.cubesServer = (IntegratedServer) cubesServer;
      Log.debug("Server set");
      this.cubesServer.start();
    } else {
      Log.warning("Server can only be set to an IntegratedServer");
    }
  } else {
    this.cubesServer = null;
    Log.debug("Server set to null");
  }
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:17,代码来源:ClientAdapter.java

示例5: stop

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private static void stop() {
  final CubesClient cubesClient = adapter.getClient();
  final CubesServer cubesServer = adapter.getServer();
  final Thread currentThread = Thread.currentThread();

  if (!isDedicatedServer()) {
    if (Adapter.getInterface().getThread() == currentThread) {
      stopFromClientThread(cubesClient, cubesServer);
    } else if (cubesServer != null && cubesServer.getThread() == currentThread) {
      stopFromServerThread(cubesClient, cubesServer);
    } else {
      stopFromOtherThread(cubesClient, cubesServer);
    }
    throw new StopLoopException();
  } else {
    if (Adapter.getInterface().getThread() == currentThread) {
      stopFromServerThread(cubesClient, cubesServer);
    } else {
      stopFromOtherThread(cubesClient, cubesServer);
    }
  }
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:23,代码来源:Adapter.java

示例6: stopFromServerThread

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private static void stopFromServerThread(final CubesClient cubesClient, final CubesServer cubesServer) {
    try {
      if (cubesClient != null) {
        cubesClient.dispose();
      }
      if (cubesServer != null) {
        cubesServer.dispose();
      }
//      if (cubesClient != null) {
//        try {
//          cubesClient.getThread().join(JOIN_TIMEOUT);
//        } catch (InterruptedException e) {
//        }
//        if (cubesClient.getThread().isAlive()) {
//          failedToStopThread(cubesClient.getThread());
//        }
//      }
    } catch (Exception e) {
      Debug.crash(e);
    }
  }
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:22,代码来源:Adapter.java

示例7: stopFromOtherThread

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private static void stopFromOtherThread(final CubesClient cubesClient, final CubesServer cubesServer) {
	try {
		if (cubesClient != null) {
			cubesClient.dispose();
		}
		if (cubesServer != null) {
			cubesServer.dispose();
		}
		// if (cubesClient != null) {
		// try {
		// cubesClient.getThread().join(JOIN_TIMEOUT);
		// } catch (InterruptedException e) {
		// }
		// if (cubesClient.getThread().isAlive()) {
		// failedToStopThread(cubesClient.getThread());
		// }
		// }
		// if (cubesServer != null) {
		// try {
		// cubesServer.getThread().join(JOIN_TIMEOUT);
		// } catch (InterruptedException e) {
		// }
		// if (cubesServer.getThread().isAlive()) {
		// failedToStopThread(cubesServer.getThread());
		// }
		// }
	} catch (Exception e) {
		Debug.crash(e);
	}
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:31,代码来源:Adapter.java

示例8: stopFromOtherThread

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private static void stopFromOtherThread(final CubesClient cubesClient, final CubesServer cubesServer) {
    try {
      if (cubesClient != null) {
        cubesClient.dispose();
      }
      if (cubesServer != null) {
        cubesServer.dispose();
      }
//      if (cubesClient != null) {
//        try {
//          cubesClient.getThread().join(JOIN_TIMEOUT);
//        } catch (InterruptedException e) {
//        }
//        if (cubesClient.getThread().isAlive()) {
//          failedToStopThread(cubesClient.getThread());
//        }
//      }
//      if (cubesServer != null) {
//        try {
//          cubesServer.getThread().join(JOIN_TIMEOUT);
//        } catch (InterruptedException e) {
//        }
//        if (cubesServer.getThread().isAlive()) {
//          failedToStopThread(cubesServer.getThread());
//        }
//      }
    } catch (Exception e) {
      Debug.crash(e);
    }
  }
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:31,代码来源:Adapter.java

示例9: getServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
public static CubesServer getServer() {
	return adapterInterface.getServer();
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:4,代码来源:Cubes.java

示例10: setServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
@Override
public void setServer(CubesServer cubesServer) throws UnsupportedOperationException {
  //throw new UnsupportedOperationException("Cannot set server");
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:5,代码来源:ServerAdapter.java

示例11: getServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
@Override
public CubesServer getServer() {
  return cubesServer;
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:5,代码来源:ServerAdapter.java

示例12: renderIf4

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
private void renderIf4(){
	if (!Branding.IS_DEBUG && cubesClient != null && cubesServer != null && cubesServer.isRunning()
			&& CubesServer.lastUpdateTime() + 2500 < System.currentTimeMillis()) {
		Adapter.gotoMenu(new UnresponsiveIntegratedServerMenu());
	}
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:7,代码来源:ClientAdapter.java

示例13: getServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
@Override
public CubesServer getServer() {
	return cubesServer;
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:5,代码来源:ClientAdapter.java

示例14: setServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
public static void setServer(CubesServer cubesServer) throws UnsupportedOperationException {
	adapter.setServer(cubesServer);
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:4,代码来源:Adapter.java

示例15: getServer

import ethanjones.cubes.side.server.CubesServer; //导入依赖的package包/类
public static CubesServer getServer() {
  return adapterInterface.getServer();
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:4,代码来源:Cubes.java


注:本文中的ethanjones.cubes.side.server.CubesServer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。