|
||||||||||
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()
|
long |
getLocalWinSize()
|
OutputStream |
getOutputStream()
|
int |
getRecipient()
|
int |
getRemoteMaxPacketSize()
|
long |
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,
long remoteWinSize,
long 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, long remoteWinSize, long remoteMaxPacketSize)
public boolean getAutoExpand()
getAutoExpand
in interface Channel
Channel.setAutoExpand(boolean)
public int getID()
getID
in interface Channel
public InputStream getInputStream()
getInputStream
in interface Channel
InputStream
for this channel.public int getLocalMaxPacketSize()
getLocalMaxPacketSize
in interface Channel
public long getLocalWinSize()
getLocalWinSize
in interface Channel
public OutputStream getOutputStream()
getOutputStream
in interface Channel
OutputStream
for this channel.public int getRecipient()
getRecipient
in interface Channel
public int getRemoteMaxPacketSize()
getRemoteMaxPacketSize
in interface Channel
public long getRemoteWinSize()
getRemoteWinSize
in interface Channel
public String getType()
getType
in interface Channel
public void handle(Message msg, SSHPacket buf) throws ConnectionException, TransportException
SSHPacketHandler
handle
in interface SSHPacketHandler
msg
- the SSH message identifier
buf
- SSHPacket
containing rest of the request
ConnectionException
TransportException
protected void closeAllStreams()
public void notifyError(SSHException error)
ErrorNotifiable
error
.
notifyError
in interface ErrorNotifiable
public void setAutoExpand(boolean autoExpand)
Channel
InputStream
.
setAutoExpand
in interface Channel
autoExpand
- whether local windows should automatically expandpublic void close() throws ConnectionException, TransportException
Channel
close
in interface Closeable
close
in interface Channel
ConnectionException
TransportException
public void join() throws ConnectionException
join
in interface Channel
ConnectionException
public void join(int timeout, TimeUnit unit) throws ConnectionException
join
in interface Channel
ConnectionException
protected void sendClose() throws TransportException
TransportException
public boolean isOpen()
isOpen
in interface Channel
protected 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
TransportException
protected 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
TransportException
protected void eofInputStreams()
public void sendEOF() throws TransportException
Channel
OutputStream
for this channel will be closed and no longer usable.
sendEOF
in interface Channel
TransportException
- 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 |