public abstract class Subsystem extends ExecutorOperationSupport<SshContext>
Modifier and Type | Field and Description |
---|---|
protected SshContext |
context |
protected SessionChannel |
session |
protected TransportProtocol |
transport |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupOnError() |
protected abstract void |
cleanupSubsystem() |
protected void |
executeOperation(ConnectionAwareTask r) |
protected void |
flagClose(ConnectionAwareTask r) |
Connection |
getConnection() |
SshContext |
getContext() |
SessionChannel |
getSession() |
protected void |
init(SessionChannel session,
SshContext context)
Initialize the subsystem with the current session and configuration.
|
void |
onFreeMessage(byte[] msg) |
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 |
parseMessage(byte[] data) |
protected void |
postCleanup() |
protected void |
processMessage(byte[] data)
Process channel data and transform into a subsystem message when enough
data has arrived.
|
void |
sendMessage(Packet packet)
Send a subsystem message.
|
addOperationListener, addTask, cleanupOperations, clearQueue, endExecution, getName, getOperationsCount, removeOperationListener, startExecution, startTask, taskAdded
protected SessionChannel session
protected TransportProtocol transport
protected SshContext context
public Subsystem(String name)
public SshContext getContext()
getContext
in class ExecutorOperationSupport<SshContext>
public Connection getConnection()
public SessionChannel getSession()
protected void init(SessionChannel session, SshContext context) throws IOException
session
- context
- IOException
protected void executeOperation(ConnectionAwareTask r)
protected void postCleanup()
protected abstract void cleanupSubsystem()
protected void processMessage(byte[] data) throws IOException
data
- IOException
protected void parseMessage(byte[] data) throws IOException
IOException
protected void cleanupOnError()
protected abstract void onSubsystemFree()
protected abstract void onMessageReceived(byte[] msg)
msg
- public void sendMessage(Packet packet) throws IOException
msg
- IOException
public void onFreeMessage(byte[] msg)
protected void flagClose(ConnectionAwareTask r)
Copyright © 2024. All rights reserved.