class LanguageModelServer implements LanguageModelServerMBean<W> {

	public static LanguageModel<String> connectToServer(String host, int rmiPort, String identifier) {
		try {
			LOG.info("Trying to connect to Language model service '{}' on {}:{}.", identifier, host, rmiPort);
			Registry registry = LocateRegistry.getRegistry(host, rmiPort);
			@SuppressWarnings("unchecked")
			LanguageModel<String> lm = (LanguageModel<String>) registry.lookup(identifier);
			return lm;
		} catch (RemoteException e) {
			LOG.error("Unable to connect to rmi registry on {}:{}. {}: {}.", host, rmiPort, e.getClass().getSimpleName(), e.getMessage());
		} catch (NotBoundException e) {
			LOG.error("Unable to connect to service {}. {}: {}.", identifier, e.getClass().getSimpleName(), e.getMessage());
		}
		return null;
	}

	public  LanguageModelServer();
	public  LanguageModelServer(LanguageModel<W> language_model);

}