com.sshtools.j2ssh.connection
Class SshMsgChannelOpen

java.lang.Object
  |
  +--com.sshtools.j2ssh.transport.SshMessage
        |
        +--com.sshtools.j2ssh.connection.SshMsgChannelOpen

public class SshMsgChannelOpen
extends SshMessage

Implements the SSH_MSG_CHANNEL_OPEN message.

Version:
1.0
Author:
Lee David Painter ( lee@sshtools.com )

Field Summary
protected static int SSH_MSG_CHANNEL_OPEN
          The message id
 
Constructor Summary
SshMsgChannelOpen()
          Constructor for the SshMsgChannelOpen object
SshMsgChannelOpen(java.lang.String channelType, long senderChannelId, long initialWindowSize, long maximumPacketSize, byte[] channelData)
          Constructor for the SshMsgChannelOpen object
 
Method Summary
protected  void constructByteArray(ByteArrayWriter baw)
          Abstract method implementation to construct a byte array containing the message data.
protected  void constructMessage(ByteArrayReader bar)
          Abstract method implementation to construct the message from a byte array.
 byte[] getChannelData()
          Gets the channel specific data
 java.lang.String getChannelType()
          Gets the channel type
 long getInitialWindowSize()
          Gets the initial window size
 long getMaximumPacketSize()
          Gets the maximum packet size
 java.lang.String getMessageName()
          Gets the message name for debugging
 long getSenderChannelId()
          Gets the sender channel id
 
Methods inherited from class com.sshtools.j2ssh.transport.SshMessage
fromByteArray, getMessageId, toByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSH_MSG_CHANNEL_OPEN

protected static final int SSH_MSG_CHANNEL_OPEN
The message id

See Also:
Constant Field Values
Constructor Detail

SshMsgChannelOpen

public SshMsgChannelOpen(java.lang.String channelType,
                         long senderChannelId,
                         long initialWindowSize,
                         long maximumPacketSize,
                         byte[] channelData)
Constructor for the SshMsgChannelOpen object

Parameters:
channelType - The channel type (i.e. 'session')
senderChannelId - The senders channel id
initialWindowSize - The initial data window space
maximumPacketSize - The maximum packet size
channelData - The channel specific data

SshMsgChannelOpen

public SshMsgChannelOpen()
Constructor for the SshMsgChannelOpen object

Method Detail

getChannelData

public byte[] getChannelData()
Gets the channel specific data

Returns:
The channel data value

getMessageName

public java.lang.String getMessageName()
Gets the message name for debugging

Specified by:
getMessageName in class SshMessage
Returns:

getChannelType

public java.lang.String getChannelType()
Gets the channel type

Returns:
The channel type

getSenderChannelId

public long getSenderChannelId()
Gets the sender channel id

Returns:
The sender channel id

getInitialWindowSize

public long getInitialWindowSize()
Gets the initial window size

Returns:
The initial window size

getMaximumPacketSize

public long getMaximumPacketSize()
Gets the maximum packet size

Returns:
The maximum packet size

constructMessage

protected void constructMessage(ByteArrayReader bar)
                         throws InvalidMessageException
Abstract method implementation to construct the message from a byte array.

Specified by:
constructMessage in class SshMessage
Parameters:
bar - The byte array being read
Throws:
InvalidMessageException - Thrown of the data cannot be read

constructByteArray

protected void constructByteArray(ByteArrayWriter baw)
                           throws InvalidMessageException
Abstract method implementation to construct a byte array containing the message data.

Specified by:
constructByteArray in class SshMessage
Parameters:
baw - The byte array being written
Throws:
InvalidMessageException - Thrown of the data cannot be written


Copyright © 2002 Sshtools.com. All Rights Reserved.