Package com.sshtools.j2ssh.connection
Class Channel
java.lang.Object
com.sshtools.j2ssh.connection.Channel
- Direct Known Subclasses:
BindingChannel
,IOChannel
,SocketChannel
,SubsystemChannel
- Version:
- $Revision: 1.74 $
- Author:
- $author$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConnectionProtocol
protected long
protected long
protected ChannelDataWindow
protected long
protected long
protected ChannelDataWindow
protected ChannelState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventListener
(ChannelEventListener eventListener) void
close()
protected void
abstract byte[]
abstract byte[]
abstract String
long
long
protected abstract int
protected abstract int
protected abstract int
getName()
long
long
getState()
protected void
init
(ConnectionProtocol connection, long localChannelId, long senderChannelId, long initialWindowSize, long maximumPacketSize) protected void
init
(ConnectionProtocol connection, long localChannelId, long senderChannelId, long initialWindowSize, long maximumPacketSize, ChannelEventListener eventListener) boolean
isClosed()
boolean
boolean
isOpen()
boolean
protected abstract void
protected abstract void
protected abstract void
protected abstract void
protected abstract void
protected abstract void
onChannelRequest
(String requestType, boolean wantReply, byte[] requestData) protected void
open()
protected void
protected void
protected void
protected void
sendChannelData
(byte[] data) protected void
sendChannelExtData
(int type, byte[] data) void
void
protected void
-
Field Details
-
localWindow
-
remoteWindow
-
connection
-
localChannelId
protected long localChannelId -
localPacketSize
protected long localPacketSize -
remoteChannelId
protected long remoteChannelId -
remotePacketSize
protected long remotePacketSize -
state
-
-
Constructor Details
-
Channel
public Channel()Creates a new Channel object.
-
-
Method Details
-
getChannelOpenData
public abstract byte[] getChannelOpenData()- Returns:
-
getChannelConfirmationData
public abstract byte[] getChannelConfirmationData()- Returns:
-
getChannelType
- Returns:
-
getMinimumWindowSpace
protected abstract int getMinimumWindowSpace()- Returns:
-
getMaximumWindowSpace
protected abstract int getMaximumWindowSpace()- Returns:
-
getMaximumPacketSize
protected abstract int getMaximumPacketSize()- Returns:
-
onChannelData
- Parameters:
msg
-- Throws:
IOException
-
processChannelData
- Parameters:
msg
-- Throws:
IOException
-
isClosed
public boolean isClosed()- Returns:
-
isOpen
public boolean isOpen()- Returns:
-
sendChannelData
- Parameters:
data
-- Throws:
IOException
-
sendChannelExtData
- Parameters:
type
-data
-- Throws:
IOException
-
onChannelExtData
- Parameters:
msg
-- Throws:
IOException
-
processChannelData
- Parameters:
msg
-- Throws:
IOException
-
getLocalChannelId
public long getLocalChannelId()- Returns:
-
getLocalPacketSize
public long getLocalPacketSize()- Returns:
-
getLocalWindow
- Returns:
-
getRemoteChannelId
public long getRemoteChannelId()- Returns:
-
getRemotePacketSize
public long getRemotePacketSize()- Returns:
-
getRemoteWindow
- Returns:
-
getState
- Returns:
-
close
- Throws:
IOException
-
remoteClose
- Throws:
IOException
-
finalizeClose
- Throws:
IOException
-
setLocalEOF
- Throws:
IOException
-
isLocalEOF
public boolean isLocalEOF()- Returns:
-
isRemoteEOF
public boolean isRemoteEOF()- Returns:
-
setRemoteEOF
- Throws:
IOException
-
addEventListener
- Parameters:
eventListener
-
-
init
protected void init(ConnectionProtocol connection, long localChannelId, long senderChannelId, long initialWindowSize, long maximumPacketSize) throws IOException - Parameters:
connection
-localChannelId
-senderChannelId
-initialWindowSize
-maximumPacketSize
-- Throws:
IOException
-
open
- Throws:
IOException
-
init
protected void init(ConnectionProtocol connection, long localChannelId, long senderChannelId, long initialWindowSize, long maximumPacketSize, ChannelEventListener eventListener) throws IOException - Parameters:
connection
-localChannelId
-senderChannelId
-initialWindowSize
-maximumPacketSize
-eventListener
-- Throws:
IOException
-
onChannelClose
- Throws:
IOException
-
onChannelEOF
- Throws:
IOException
-
onChannelOpen
- Throws:
IOException
-
onChannelRequest
protected abstract void onChannelRequest(String requestType, boolean wantReply, byte[] requestData) throws IOException - Parameters:
requestType
-wantReply
-requestData
-- Throws:
IOException
-
setName
- Parameters:
name
-
-
getName
- Returns:
-