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 SubsystemMessageStore
messageStore
protected SessionChannelClient
session
-
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.String
getName()
SessionChannelClient
getSessionChannel()
boolean
isClosed()
protected abstract boolean
onStart()
void
run()
protected void
sendMessage(SubsystemMessage msg)
void
setSessionChannel(SessionChannelClient session)
boolean
start()
void
stop()
-
-
-
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:
InvalidMessageException
java.io.IOException
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
stop
public void stop() throws java.io.IOException
- Throws:
java.io.IOException
-
-