Package com.sshtools.j2ssh.subsystem
Class SubsystemClient
- java.lang.Object
-
- com.sshtools.j2ssh.subsystem.SubsystemClient
-
- All Implemented Interfaces:
java.lang.Runnable
public abstract class SubsystemClient extends java.lang.Object implements java.lang.Runnable- Version:
- $Revision: 1.33 $
- Author:
- $author$
-
-
Field Summary
Fields Modifier and Type Field Description protected SubsystemMessageStoremessageStoreprotected SessionChannelClientsession
-
Constructor Summary
Constructors Constructor Description SubsystemClient(java.lang.String name)Creates a new SubsystemClient object.SubsystemClient(java.lang.String name, SubsystemMessageStore messageStore)Creates a new SubsystemClient object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()SessionChannelClientgetSessionChannel()booleanisClosed()protected abstract booleanonStart()voidrun()protected voidsendMessage(SubsystemMessage msg)voidsetSessionChannel(SessionChannelClient session)booleanstart()voidstop()
-
-
-
Field Detail
-
messageStore
protected SubsystemMessageStore messageStore
-
session
protected SessionChannelClient session
-
-
Constructor Detail
-
SubsystemClient
public SubsystemClient(java.lang.String name)
Creates a new SubsystemClient object.- Parameters:
name-
-
SubsystemClient
public SubsystemClient(java.lang.String name, SubsystemMessageStore messageStore)Creates a new SubsystemClient object.- Parameters:
name-messageStore-
-
-
Method Detail
-
isClosed
public boolean isClosed()
- Returns:
-
setSessionChannel
public void setSessionChannel(SessionChannelClient session)
- Parameters:
session-
-
getSessionChannel
public SessionChannelClient getSessionChannel()
- Returns:
-
start
public boolean start() throws java.io.IOException- Returns:
- Throws:
java.io.IOException
-
onStart
protected abstract boolean onStart() throws java.io.IOException- Returns:
- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
- Returns:
-
sendMessage
protected void sendMessage(SubsystemMessage msg) throws InvalidMessageException, java.io.IOException
- Parameters:
msg-- Throws:
InvalidMessageExceptionjava.io.IOException
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
stop
public void stop() throws java.io.IOException- Throws:
java.io.IOException
-
-