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, typedCharpublic SSH2TerminalAdapterImpl(TerminalWindow terminal)
terminal - Terminal window to use.public TerminalWindow getTerminal()
SSH2TerminalAdaptergetTerminal in interface SSH2TerminalAdapterpublic void attach(SSH2SessionChannel session)
SSH2TerminalAdapterattach in interface SSH2TerminalAdaptersession - The session to attach to.public void detach()
SSH2TerminalAdapterdetach in interface SSH2TerminalAdapterpublic void startChaff()
TerminalInputChaffstartChaff in interface SSH2TerminalAdapterstartChaff in class TerminalInputChaffpublic void stopChaff()
TerminalInputChaffstopChaff in interface SSH2TerminalAdapterstopChaff in class TerminalInputChaffpublic void closed(SSH2Channel channel)
SSH2ChannelCloseListenerclosed in interface SSH2ChannelCloseListenerchannel - The channel which is closedprotected void sendTypedChar(int c)
sendTypedChar in class TerminalInputChaffc - The typed character to send.protected void sendFakeChar()
sendFakeChar in class TerminalInputChaffpublic void sendBytes(byte[] b)
sendBytes in interface TerminalInputListenerb - Array of bytes to send.public void sendBytesDirect(byte[] b)
TerminalInputListenersendBytesDirect in interface TerminalInputListenerb - array of bytes representing characters to sendpublic void signalWindowChanged(int rows,
int cols,
int vpixels,
int hpixels)
signalWindowChanged in interface TerminalInputListenerrows - new number of rowscols - new number of columnsvpixels - new number of vertical pixelshpixels - new number of horizontal pixelspublic void sendBreak()
sendBreak in interface TerminalInputListenersendBreak in class TerminalInputChaff