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

com.github.fonimus.ssh.shell.SshContext Maven / Gradle / Ivy

The newest version!
package com.github.fonimus.ssh.shell;

import java.util.List;

import org.jline.reader.LineReader;
import org.jline.terminal.Terminal;

import com.github.fonimus.ssh.shell.auth.SshAuthentication;
import com.github.fonimus.ssh.shell.postprocess.PostProcessorObject;

/**
 * Ssh context to hold terminal, exit callback and thread per thread
 */
public class SshContext {

	private final LineReader lineReader;

	private Thread thread;

	private Terminal terminal;

	private SshAuthentication authentication;

	private List postProcessorsList;

	/**
	 * Constructor
	 *
	 * @param thread       ssh thread session
	 * @param terminal     ssh terminal
	 * @param lineReader   ssh line reader
	 * @param authentication    (optional) spring authentication objects
	 */
	public SshContext(Thread thread, Terminal terminal, LineReader lineReader,
			SshAuthentication authentication) {
		this.thread = thread;
		this.terminal = terminal;
		this.lineReader = lineReader;
		this.authentication = authentication;
	}

	public Thread getThread() {
		return thread;
	}

	public Terminal getTerminal() {
		return terminal;
	}

	public LineReader getLineReader() {
		return lineReader;
	}

	public SshAuthentication getAuthentication() {
		return authentication;
	}

	public List getPostProcessorsList() {
		return postProcessorsList;
	}

	public void setPostProcessorsList(List postProcessorsList) {
		this.postProcessorsList = postProcessorsList;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy