org.apache.sshd.server.channel
Class ChannelSession

java.lang.Object
  extended by org.apache.sshd.common.channel.AbstractChannel
      extended by org.apache.sshd.server.channel.AbstractServerChannel
          extended by org.apache.sshd.server.channel.ChannelSession
All Implemented Interfaces:
Channel

public class ChannelSession
extends AbstractServerChannel

TODO Add javadoc

Author:
Apache MINA SSHD Project

Nested Class Summary
static class ChannelSession.Factory
           
protected static class ChannelSession.StandardEnvironment
           
 
Field Summary
protected  Command command
           
protected  ChannelSession.StandardEnvironment env
           
protected  java.io.OutputStream err
           
protected  java.io.InputStream in
           
protected  java.io.OutputStream out
           
protected  java.io.OutputStream shellIn
           
protected  java.lang.String type
           
 
Fields inherited from class org.apache.sshd.server.channel.AbstractServerChannel
exitStatusSent
 
Fields inherited from class org.apache.sshd.common.channel.AbstractChannel
closeFuture, closing, DEFAULT_PACKET_SIZE, DEFAULT_WINDOW_SIZE, eof, id, localWindow, lock, log, recipient, remoteWindow, session
 
Constructor Summary
ChannelSession()
           
 
Method Summary
protected  void addEnvVariable(java.lang.String name, java.lang.String value)
           
 CloseFuture close(boolean immediately)
           
protected  void closeShell(int exitValue)
           
protected  void doWriteData(byte[] data, int off, int len)
           
protected  void doWriteExtendedData(byte[] data, int off, int len)
           
protected  ChannelSession.StandardEnvironment getEnvironment()
           
protected  int getPtyModeValue(PtyMode mode)
           
protected  boolean handleAgentForwarding(Buffer buffer)
           
protected  boolean handleEnv(Buffer buffer)
           
 void handleEof()
           
protected  boolean handleExec(Buffer buffer)
           
protected  boolean handlePtyReq(Buffer buffer)
           
 void handleRequest(Buffer buffer)
           
protected  boolean handleRequest(java.lang.String type, Buffer buffer)
           
protected  boolean handleShell(Buffer buffer)
           
protected  boolean handleSignal(Buffer buffer)
           
protected  boolean handleSubsystem(Buffer buffer)
           
protected  boolean handleWindowChange(Buffer buffer)
           
protected  boolean handleX11Forwarding(Buffer buffer)
           
protected  void prepareCommand()
           
 
Methods inherited from class org.apache.sshd.server.channel.AbstractServerChannel
doInit, handleOpenFailure, handleOpenSuccess, open, sendExitStatus
 
Methods inherited from class org.apache.sshd.common.channel.AbstractChannel
configureWindow, doClose, getId, getLocalWindow, getRecipient, getSession, handleClose, handleData, handleExtendedData, handleFailure, handleWindowAdjust, init, sendEof, sendWindowAdjust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected java.lang.String type

in

protected java.io.InputStream in

out

protected java.io.OutputStream out

err

protected java.io.OutputStream err

command

protected Command command

shellIn

protected java.io.OutputStream shellIn

env

protected ChannelSession.StandardEnvironment env
Constructor Detail

ChannelSession

public ChannelSession()
Method Detail

close

public CloseFuture close(boolean immediately)
Specified by:
close in interface Channel
Overrides:
close in class AbstractChannel

handleEof

public void handleEof()
               throws java.io.IOException
Specified by:
handleEof in interface Channel
Overrides:
handleEof in class AbstractChannel
Throws:
java.io.IOException

handleRequest

public void handleRequest(Buffer buffer)
                   throws java.io.IOException
Specified by:
handleRequest in interface Channel
Overrides:
handleRequest in class AbstractChannel
Throws:
java.io.IOException

doWriteData

protected void doWriteData(byte[] data,
                           int off,
                           int len)
                    throws java.io.IOException
Specified by:
doWriteData in class AbstractChannel
Throws:
java.io.IOException

doWriteExtendedData

protected void doWriteExtendedData(byte[] data,
                                   int off,
                                   int len)
                            throws java.io.IOException
Specified by:
doWriteExtendedData in class AbstractChannel
Throws:
java.io.IOException

handleRequest

protected boolean handleRequest(java.lang.String type,
                                Buffer buffer)
                         throws java.io.IOException
Throws:
java.io.IOException

handleEnv

protected boolean handleEnv(Buffer buffer)
                     throws java.io.IOException
Throws:
java.io.IOException

handlePtyReq

protected boolean handlePtyReq(Buffer buffer)
                        throws java.io.IOException
Throws:
java.io.IOException

handleWindowChange

protected boolean handleWindowChange(Buffer buffer)
                              throws java.io.IOException
Throws:
java.io.IOException

handleSignal

protected boolean handleSignal(Buffer buffer)
                        throws java.io.IOException
Throws:
java.io.IOException

handleShell

protected boolean handleShell(Buffer buffer)
                       throws java.io.IOException
Throws:
java.io.IOException

handleExec

protected boolean handleExec(Buffer buffer)
                      throws java.io.IOException
Throws:
java.io.IOException

handleSubsystem

protected boolean handleSubsystem(Buffer buffer)
                           throws java.io.IOException
Throws:
java.io.IOException

prepareCommand

protected void prepareCommand()
                       throws java.io.IOException
Throws:
java.io.IOException

getPtyModeValue

protected int getPtyModeValue(PtyMode mode)

handleAgentForwarding

protected boolean handleAgentForwarding(Buffer buffer)
                                 throws java.io.IOException
Throws:
java.io.IOException

handleX11Forwarding

protected boolean handleX11Forwarding(Buffer buffer)
                               throws java.io.IOException
Throws:
java.io.IOException

addEnvVariable

protected void addEnvVariable(java.lang.String name,
                              java.lang.String value)

getEnvironment

protected ChannelSession.StandardEnvironment getEnvironment()

closeShell

protected void closeShell(int exitValue)
                   throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.