|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maverick.ssh.SubsystemChannel
This class provides useful methods for implementing an SSH2 subsystem. Subsystems typically send messages in the following format.
Messages sent using the methods of this class will have the UINT length automatically added and messages received will be unwrapped with just the type and payload being returned. Although subsystems were defined within the SSH2 connection protocol this class takes a single SshChannel as an argument to its constructor which enables subsystems to run over both SSH1 and SSH2 channels.UINT length byte type byte[length-1] payload
Constructor Summary | |
SubsystemChannel(SshChannel channel)
Create a new subsystem channel. |
Method Summary | |
void |
close()
Close the subsystem |
protected Packet |
createPacket()
Get a packet from the available pool or create if non available |
boolean |
isClosed()
Is the subsystem closed? |
byte[] |
nextMessage()
Read a subsystem message from the channel inputstream. |
protected void |
sendMessage(byte[] msg)
Deprecated. This has changed internally to use a Packet and it
is recommended that all implementations change to use Packet 's
as they provide a more efficent way of sending data. |
protected void |
sendMessage(Packet msg)
Write a subsystem message to the channel outputstream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SubsystemChannel(SshChannel channel) throws SshException
channel
-
SshException
Method Detail |
public boolean isClosed()
public void close() throws java.io.IOException
java.io.IOException
public byte[] nextMessage() throws SshException
SshException
protected void sendMessage(Packet msg) throws SshException
msg
-
SshException
protected void sendMessage(byte[] msg) throws SshException
Packet
and it
is recommended that all implementations change to use Packet
's
as they provide a more efficent way of sending data.
msg
-
SshException
protected Packet createPacket() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |