|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.schmizz.sshj.connection.channel.AbstractChannel
public abstract class AbstractChannel
| 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 | |
|---|---|
protected Event<ConnectionException> |
close
Channel close event |
protected Connection |
conn
Connection layer |
protected org.slf4j.Logger |
log
Logger |
protected Window.Local |
lwin
Local window |
protected Event<ConnectionException> |
open
Channel open event |
protected Window.Remote |
rwin
Remote window |
protected Transport |
trans
Transport layer |
| Constructor Summary | |
|---|---|
protected |
AbstractChannel(Connection conn,
String type)
|
| Method Summary | |
|---|---|
void |
close()
Close this channel. |
protected void |
closeAllStreams()
Called when all I/O streams should be closed. |
protected void |
eofInputStreams()
Called when EOF has been received. |
protected void |
finishOff()
|
boolean |
getAutoExpand()
|
int |
getID()
|
InputStream |
getInputStream()
|
int |
getLocalMaxPacketSize()
|
int |
getLocalWinSize()
|
OutputStream |
getOutputStream()
|
int |
getRecipient()
|
int |
getRemoteMaxPacketSize()
|
int |
getRemoteWinSize()
|
String |
getType()
|
protected void |
gotExtendedData(SSHPacket buf)
|
protected void |
gotUnknown(Message msg,
SSHPacket buf)
|
void |
handle(Message msg,
SSHPacket buf)
Delegate handling of some SSH packet to this object. |
protected void |
handleRequest(String reqType,
SSHPacket buf)
|
protected void |
init(int recipient,
int remoteWinSize,
int remoteMaxPacketSize)
|
boolean |
isOpen()
|
void |
join()
|
void |
join(int timeout,
TimeUnit unit)
|
protected SSHPacket |
newBuffer(Message cmd)
|
void |
notifyError(SSHException error)
Notifies this object of an error. |
protected void |
receiveInto(ChannelInputStream stream,
SSHPacket buf)
|
protected Event<ConnectionException> |
sendChannelRequest(String reqType,
boolean wantReply,
Buffer.PlainBuffer reqSpecific)
|
protected void |
sendClose()
|
void |
sendEOF()
Sends an EOF message to the server for this channel; indicating that no more data will be sent by us. |
void |
setAutoExpand(boolean autoExpand)
Set whether local window should automatically expand when data is received, irrespective of whether data has been read from that stream. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger log
protected final Transport trans
protected final Connection conn
protected final Event<ConnectionException> open
protected final Event<ConnectionException> close
protected final Window.Local lwin
protected Window.Remote rwin
| Constructor Detail |
|---|
protected AbstractChannel(Connection conn,
String type)
| Method Detail |
|---|
protected void init(int recipient,
int remoteWinSize,
int remoteMaxPacketSize)
public boolean getAutoExpand()
getAutoExpand in interface ChannelChannel.setAutoExpand(boolean)public int getID()
getID in interface Channelpublic InputStream getInputStream()
getInputStream in interface ChannelInputStream for this channel.public int getLocalMaxPacketSize()
getLocalMaxPacketSize in interface Channelpublic int getLocalWinSize()
getLocalWinSize in interface Channelpublic OutputStream getOutputStream()
getOutputStream in interface ChannelOutputStream for this channel.public int getRecipient()
getRecipient in interface Channelpublic int getRemoteMaxPacketSize()
getRemoteMaxPacketSize in interface Channelpublic int getRemoteWinSize()
getRemoteWinSize in interface Channelpublic String getType()
getType in interface Channel
public void handle(Message msg,
SSHPacket buf)
throws ConnectionException,
TransportException
SSHPacketHandler
handle in interface SSHPacketHandlermsg - the SSH message identifierbuf - SSHPacket containing rest of the request
ConnectionException
TransportExceptionprotected void closeAllStreams()
public void notifyError(SSHException error)
ErrorNotifiableerror.
notifyError in interface ErrorNotifiablepublic void setAutoExpand(boolean autoExpand)
ChannelInputStream.
setAutoExpand in interface ChannelautoExpand - whether local windows should automatically expand
public void close()
throws ConnectionException,
TransportException
Channel
close in interface Closeableclose in interface ChannelConnectionException
TransportException
public void join()
throws ConnectionException
join in interface ChannelConnectionException
public void join(int timeout,
TimeUnit unit)
throws ConnectionException
join in interface ChannelConnectionException
protected void sendClose()
throws TransportException
TransportExceptionpublic boolean isOpen()
isOpen in interface Channelprotected void finishOff()
protected void gotExtendedData(SSHPacket buf)
throws ConnectionException,
TransportException
ConnectionException
TransportException
protected void gotUnknown(Message msg,
SSHPacket buf)
throws ConnectionException,
TransportException
ConnectionException
TransportException
protected void handleRequest(String reqType,
SSHPacket buf)
throws ConnectionException,
TransportException
ConnectionException
TransportExceptionprotected SSHPacket newBuffer(Message cmd)
protected void receiveInto(ChannelInputStream stream,
SSHPacket buf)
throws ConnectionException,
TransportException
ConnectionException
TransportException
protected Event<ConnectionException> sendChannelRequest(String reqType,
boolean wantReply,
Buffer.PlainBuffer reqSpecific)
throws TransportException
TransportExceptionprotected void eofInputStreams()
public void sendEOF()
throws TransportException
ChannelOutputStream for this channel will be closed and no longer usable.
sendEOF in interface ChannelTransportException - if there is an error sending the EOF messagepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||