com.mindbright.ssh2
public class SSH2TerminalAdapterImpl extends TerminalInputChaff implements SSH2TerminalAdapter, SSH2ChannelCloseListener
Constructor and Description |
---|
SSH2TerminalAdapterImpl(TerminalWindow terminal)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
attach(SSH2SessionChannel session)
Attach the terminal to a session
|
void |
closed(SSH2Channel channel)
Called when the channel is closed.
|
void |
detach()
Detach from the session
|
TerminalWindow |
getTerminal()
Get the actual terminal window.
|
void |
sendBreak()
This function should be called by the actual terminal window
whenever the user wants to send break.
|
void |
sendBytes(byte[] b)
Send a number of bytes.
|
void |
sendBytesDirect(byte[] b)
Send some bytes directly to the host.
|
protected void |
sendFakeChar()
Send a fake character.
|
protected void |
sendTypedChar(int c)
Send an actually typed character.
|
void |
signalWindowChanged(int rows,
int cols,
int vpixels,
int hpixels)
This function should be called by the actual terminal window
whenever it is resized.
|
void |
startChaff()
Start sending chaff
|
void |
stopChaff()
Stop sending chaff
|
dispenseChaff, isChaffActive, run, signalTermTypeChanged, typedChar, typedChar
public SSH2TerminalAdapterImpl(TerminalWindow terminal)
terminal
- Terminal window to use.public TerminalWindow getTerminal()
SSH2TerminalAdapter
getTerminal
in interface SSH2TerminalAdapter
public void attach(SSH2SessionChannel session)
SSH2TerminalAdapter
attach
in interface SSH2TerminalAdapter
session
- The session to attach to.public void detach()
SSH2TerminalAdapter
detach
in interface SSH2TerminalAdapter
public void startChaff()
TerminalInputChaff
startChaff
in interface SSH2TerminalAdapter
startChaff
in class TerminalInputChaff
public void stopChaff()
TerminalInputChaff
stopChaff
in interface SSH2TerminalAdapter
stopChaff
in class TerminalInputChaff
public void closed(SSH2Channel channel)
SSH2ChannelCloseListener
closed
in interface SSH2ChannelCloseListener
channel
- The channel which is closedprotected void sendTypedChar(int c)
sendTypedChar
in class TerminalInputChaff
c
- The typed character to send.protected void sendFakeChar()
sendFakeChar
in class TerminalInputChaff
public void sendBytes(byte[] b)
sendBytes
in interface TerminalInputListener
b
- Array of bytes to send.public void sendBytesDirect(byte[] b)
TerminalInputListener
sendBytesDirect
in interface TerminalInputListener
b
- array of bytes representing characters to sendpublic void signalWindowChanged(int rows, int cols, int vpixels, int hpixels)
signalWindowChanged
in interface TerminalInputListener
rows
- new number of rowscols
- new number of columnsvpixels
- new number of vertical pixelshpixels
- new number of horizontal pixelspublic void sendBreak()
sendBreak
in interface TerminalInputListener
sendBreak
in class TerminalInputChaff