You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2012/09/14 13:06:27 UTC
svn commit: r1384721 - in
/mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd:
ClientSession.java client/channel/ChannelSession.java
Author: gnodet
Date: Fri Sep 14 11:06:26 2012
New Revision: 1384721
URL: http://svn.apache.org/viewvc?rev=1384721&view=rev
Log:
Add a bit of javadoc and fix a typo
Modified:
mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/ClientSession.java
mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/client/channel/ChannelSession.java
Modified: mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/ClientSession.java
URL: http://svn.apache.org/viewvc/mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/ClientSession.java?rev=1384721&r1=1384720&r2=1384721&view=diff
==============================================================================
--- mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/ClientSession.java (original)
+++ mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/ClientSession.java Fri Sep 14 11:06:26 2012
@@ -56,25 +56,60 @@ public interface ClientSession {
int WAIT_AUTH = 0x0004;
int AUTHED = 0x0008;
+ /**
+ * Authenticate the session with the given username using an ssh agent.
+ */
AuthFuture authAgent(String username) throws IOException;
+ /**
+ * Authenticate the session with the given username and password.
+ */
AuthFuture authPassword(String username, String password) throws IOException;
+ /**
+ * Authenticate the session with the gien username and public key.
+ */
AuthFuture authPublicKey(String username, KeyPair key) throws IOException;
+ /**
+ * Create a channel of the given type.
+ * Same as calling <code>createChannel(type, null)</code>.
+ */
ClientChannel createChannel(String type) throws Exception;
+ /**
+ * Create a channel of the given type and subtype.
+ */
ClientChannel createChannel(String type, String subType) throws Exception;
+ /**
+ * Create a channel to start a shell.
+ */
ChannelShell createShellChannel() throws Exception;
+ /**
+ * Create a channel to execute a command.
+ */
ChannelExec createExecChannel(String command) throws Exception;
+ /**
+ * Create a subsystem channel.
+ */
ChannelSubsystem createSubsystemChannel(String subsystem) throws Exception;
+ /**
+ * Wait for a specific state.
+ */
int waitFor(int mask, long timeout);
+ /**
+ * Close this session.
+ */
CloseFuture close(boolean immediately);
+ /**
+ * Access to the metadata.
+ */
Map<Object, Object> getMetadataMap();
+
}
Modified: mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/client/channel/ChannelSession.java
URL: http://svn.apache.org/viewvc/mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/client/channel/ChannelSession.java?rev=1384721&r1=1384720&r2=1384721&view=diff
==============================================================================
--- mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/client/channel/ChannelSession.java (original)
+++ mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/client/channel/ChannelSession.java Fri Sep 14 11:06:26 2012
@@ -18,13 +18,13 @@
*/
package org.apache.sshd.client.channel;
+import java.io.IOException;
+import java.io.InputStream;
+
import org.apache.sshd.client.future.OpenFuture;
import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.util.Buffer;
-import java.io.IOException;
-import java.io.InputStream;
-
/**
* TODO Add javadoc
*
@@ -40,7 +40,7 @@ public class ChannelSession extends Abst
public OpenFuture open() throws Exception {
if (in == null || out == null || err == null) {
- throw new IllegalStateException("in, out and err streams should be set before openeing channel");
+ throw new IllegalStateException("in, out and err streams should be set before opening channel");
}
return internalOpen();
}