public Forwarder() throws JSchException {

		worker = new Thread(new Runnable() {

			@Override
			public void run() {
				while (!Thread.interrupted()) {
					lock.lock();
					try {
						if (init) {
							try {
								inits();
							} catch (JSchException e) {
								// TODO Auto-generated catch block
								e.printStackTrace();
							}
							init = false;
						}
						if (forward) {

							forward();
							forward = false;
						}
						if (end) {
							nonForward();
							break;
						}
					} finally {
						lock.unlock();
					}
				}
			}
		});
		worker.start();

	}