com.sshtools.j2ssh.connection
Class SshMsgChannelRequest

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

public class SshMsgChannelRequest
extends SshMessage

Implements the SSH_MSG_CHANNEL_REQUEST message.

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

Field Summary
protected static int SSH_MSG_CHANNEL_REQUEST
          The message id
 
Constructor Summary
SshMsgChannelRequest()
          Constructor for the SshMsgChannelRequest object
SshMsgChannelRequest(long recipientChannel, java.lang.String requestType, boolean wantReply, byte[] channelData)
          Constructor for the SshMsgChannelRequest 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 request specific data
 java.lang.String getMessageName()
          Gets the message name for debugging
 long getRecipientChannel()
          Gets the recipient channel id
 java.lang.String getRequestType()
          Gets the request type
 boolean getWantReply()
          Indicates whether the sender wants an explicit reply
 
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_REQUEST

protected static final int SSH_MSG_CHANNEL_REQUEST
The message id

See Also:
Constant Field Values
Constructor Detail

SshMsgChannelRequest

public SshMsgChannelRequest(long recipientChannel,
                            java.lang.String requestType,
                            boolean wantReply,
                            byte[] channelData)
Constructor for the SshMsgChannelRequest object

Parameters:
recipientChannel - The recipient channel id
requestType - The channel request type
wantReply - True if you want the remote side to reply
channelData - The channel request specific data

SshMsgChannelRequest

public SshMsgChannelRequest()
Constructor for the SshMsgChannelRequest object

Method Detail

getMessageName

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

Specified by:
getMessageName in class SshMessage
Returns:

getRecipientChannel

public long getRecipientChannel()
Gets the recipient channel id

Returns:
The recipient channel id

getRequestType

public java.lang.String getRequestType()
Gets the request type

Returns:
The request type

getWantReply

public boolean getWantReply()
Indicates whether the sender wants an explicit reply

Returns:
The want reply value

getChannelData

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

Returns:
The channel request data

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 - Description of the Exception

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 - Description of the Exception


Copyright © 2002 Sshtools.com. All Rights Reserved.