public abstract class Subsystem extends Object implements com.maverick.ssh.components.SshComponent
| Modifier and Type | Field and Description |
|---|---|
protected SshContext |
context |
protected SessionChannel |
session |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
void |
init(SessionChannel session)
Initialize the subsystem with the current session and configuration.
|
protected abstract void |
onMessageReceived(byte[] msg)
Called when a subsystem message has been extracted from the incoming data
stream.
|
protected abstract void |
onSubsystemFree()
The subsystem has been closed and all resources should be freed.
|
protected void |
processMessage(byte[] data)
Process channel data and transform into a subsystem message when enough
data has arrived.
|
protected void |
sendMessage(com.maverick.ssh.Packet packet)
Send a subsystem message.
|
protected SessionChannel session
protected SshContext context
public Subsystem(String name)
public String getName()
getName in interface com.maverick.ssh.components.SshComponentpublic void init(SessionChannel session) throws IOException, PermissionDeniedException
session - context - IOExceptionPermissionDeniedExceptionprotected void processMessage(byte[] data)
throws IOException
data - IOExceptionprotected abstract void onSubsystemFree()
protected abstract void onMessageReceived(byte[] msg)
throws IOException
msg - IOExceptionprotected void sendMessage(com.maverick.ssh.Packet packet)
msg - Copyright © 2012. All Rights Reserved.