All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.openbox.server.DefaultSshRequest Maven / Gradle / Ivy

package com.googlecode.openbox.server;

public class DefaultSshRequest implements SshRequest {
	private Server server;
	private static final ThreadLocal commandPool = new ThreadLocal();
	private static final ThreadLocal resposnePool = new ThreadLocal();

	public DefaultSshRequest(Server server){
		this.server = server;
	}
	
	@Override
	public void send(String sshCommand) {
		commandPool.set(sshCommand);
		resposnePool.set(server.getSshClient(false).executeSingleCommand(
				System.out, commandPool.get()));
	}

	public Server getServer() {
		return server;
	}

	public String getCommand() {
		return commandPool.get();
	}

	@Override
	public String getResponse() {
		return resposnePool.get();

	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy