public void start(final Environment env) throws IOException { Context old = sshScope.set(context); String message; try { message = messageFactory.get().getMessage(); } finally { sshScope.set(old); } err.write(Constants.encode(message.toString())); err.flush(); in.close(); out.close(); err.close(); exit.onExit(127); }
public void setSession(final ServerSession session) { SshSession s = session.getAttribute(SshSession.KEY); this.context = sshScope.newContext(schemaFactory, s, ""); }