# AbstractDirectChannel (sshj 0.4.0 API)
Date: 2011-06-06

## net.schmizz.sshj.connection.channel.direct
Class AbstractDirectChannel

    java.lang.Object
      net.schmizz.sshj.connection.channel.AbstractChannel
          net.schmizz.sshj.connection.channel.direct.AbstractDirectChannel

All Implemented Interfaces:
  Closeable, ErrorNotifiable, SSHPacketHandler, Channel, Channel.Direct

Direct Known Subclasses:
  SessionChannel

    public abstract class AbstractDirectChannel

extends AbstractChannel
implements Channel.Direct

Base class for direct channels whose open is initated by the client.

Nested Class Summary

Nested classes/interfaces inherited from interface net.schmizz.sshj.connection.channel.Channel
`Channel.Direct, Channel.Forwarded`

Nested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable
`ErrorNotifiable.Util`

Field Summary

Fields inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
`close, conn, log, lwin, open, rwin, trans`

Constructor Summary
`protected` `AbstractDirectChannel(Connection conn, String type)`

Method Summary
`protected SSHPacket` `buildOpenReq()`
`protected void` `gotUnknown(Message cmd, SSHPacket buf)`
`void` `open()` Request opening this channel from remote end.

Methods inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
`close, closeAllStreams, eofInputStreams, finishOff, getAutoExpand, getID, getInputStream, getLocalMaxPacketSize, getLocalWinSize, getOutputStream, getRecipient, getRemoteMaxPacketSize, getRemoteWinSize, getType, gotExtendedData, handle, handleRequest, init, isOpen, join, join, newBuffer, notifyError, receiveInto, sendChannelRequest, sendClose, sendEOF, setAutoExpand, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface net.schmizz.sshj.connection.channel.Channel
`close, getAutoExpand, getID, getInputStream, getLocalMaxPacketSize, getLocalWinSize, getOutputStream, getRecipient, getRemoteMaxPacketSize, getRemoteWinSize, getType, isOpen, join, join, sendEOF, setAutoExpand`

Methods inherited from interface net.schmizz.sshj.common.SSHPacketHandler
`handle`

Methods inherited from interface net.schmizz.sshj.common.ErrorNotifiable
`notifyError`

Constructor Detail

### AbstractDirectChannel

    protected AbstractDirectChannel(Connection conn,
                                    String type)

Method Detail

### open

    public void open()
              throws ConnectionException,
                     TransportException

  Description copied from interface: `Channel.Direct`
  Request opening this channel from remote end.

  Specified by:
    `open` in interface `Channel.Direct`
  Throws:
    `OpenFailException` - in case the channel open request was rejected
    `ConnectionException` - other connection-layer error
    `TransportException` - error writing packets etc.

### buildOpenReq

    protected SSHPacket buildOpenReq()

### gotUnknown

    protected void gotUnknown(Message cmd,
                              SSHPacket buf)
                       throws ConnectionException,
                              TransportException

  Overrides:
    `gotUnknown` in class `AbstractChannel`
  Throws:
    `ConnectionException`
    `TransportException`

Copyright © 2009-2011. All Rights Reserved.