Package com.sshtools.daemon.subsystem
Class SubsystemServer
- java.lang.Object
-
- com.sshtools.daemon.subsystem.SubsystemServer
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
SftpSubsystemServer
public abstract class SubsystemServer extends java.lang.Object implements java.lang.Runnable- Version:
- $Revision: 1.12 $
- Author:
- $author$
-
-
Field Summary
Fields Modifier and Type Field Description protected SessionChannelServersession
-
Constructor Summary
Constructors Constructor Description SubsystemServer()Creates a new SubsystemServer object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetInputStream()java.io.OutputStreamgetOutputStream()StartStopStategetState()protected abstract voidonMessageReceived(SubsystemMessage msg)protected voidregisterMessage(int messageId, java.lang.Class implementor)voidrun()protected voidsendMessage(SubsystemMessage msg)voidsetSession(SessionChannelServer session)voidstart()voidstop()
-
-
-
Field Detail
-
session
protected SessionChannelServer session
-
-
Method Detail
-
setSession
public void setSession(SessionChannelServer session)
- Parameters:
session-
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Returns:
- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException- Returns:
- Throws:
java.io.IOException
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
start
public void start()
-
stop
public void stop()
-
getState
public StartStopState getState()
- Returns:
-
onMessageReceived
protected abstract void onMessageReceived(SubsystemMessage msg)
- Parameters:
msg-
-
registerMessage
protected void registerMessage(int messageId, java.lang.Class implementor)- Parameters:
messageId-implementor-
-
sendMessage
protected void sendMessage(SubsystemMessage msg)
- Parameters:
msg-
-
-