|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.monica.javacom.ssh.MJCSSHTransportLayer
This is the main class for the MCJ SSH2 layer. It provides functionality for
the transport, authentication and connection layers of SSH2. This class is
compliand to the MJC layer hierarchy and can be placed between the MJCTerminal and
the MJCTransport layers. It provides both MJCProtocol and MJCCiphering functionality
in the means of the MJC layer hierarchy.
Constructor Summary | |
MJCSSHTransportLayer()
|
Method Summary | |
void |
closeApplication()
This method closes the client side application. |
void |
connectionClosedEvent(MJCReadable readable)
Indicates that the source connection of the specified MJCReadable has been closed. |
void |
errorEvent(java.lang.String errorDesc,
MJCReadable readable)
Indicates that there was an error in the source connection of the specified MJCReadable. |
void |
flush()
Flushes the contents of the write buffer to bottom layers. |
int |
getAvailable()
Returns the number of bytes that are available for read out from this MJCReadable. |
java.lang.String |
getCloserName()
Returns the MJC name of the MJCCloser. |
java.lang.String |
getCloserVersion()
Returns the MJC version of the MJCCloser. |
MJCConfiguration |
getConfiguration()
Returns the MJCConfiguration with which this object is customized. |
java.lang.String |
getInput()
Returns the contents of the read buffer from this MJCReadable. |
java.lang.String |
getLastWriteableError()
Returns the error message of the last occured error. |
MJCReadable |
getReadable()
Returns the MJCReadable from which data will be read. |
java.lang.String |
getReadableName()
Returns the MJC name of the MJCReadable. |
java.lang.String |
getReadableVersion()
Returns the MJC version of the MJCReadable. |
MJCReader |
getReader()
Returns the MJCReader to which readEvents will be sent. |
java.lang.String |
getReaderName()
Returns the MJC name of the MJCReader. |
java.lang.String |
getReaderVersion()
Returns the MJC version of the MJCReader. |
MJCWriteable |
getWriteable()
Returns the MJCWriteable to which this MCJWriter will write. |
java.lang.String |
getWriteableName()
Returns the MJC name of the MJCWriteable. |
java.lang.String |
getWriteableVersion()
Returns the MJC version of the MJCWriteable. |
java.lang.String |
getWriterName()
Returns the MJC name of the MJCWriter. |
java.lang.String |
getWriterVersion()
Returns the MJC version of the MJCWriter. |
boolean |
isReadableConnected()
Returns wether the MJCReadable is still connected to its source. |
boolean |
isWriteableConnected()
Returns wether the MJCWriteable is connected to its target. |
void |
readEvent(MJCReadable readable)
Indicates that there is data available from the specified MJCReadable. |
void |
run()
Entry point for the reader thread. |
void |
setConfiguration(MJCConfiguration configuration)
Sets the MJCConfiguration for this object. |
void |
setReadable(MJCReadable readable)
Sets the MJCReadable from which data has to be read. |
void |
setReader(MJCReader reader)
Sets the MJCReader to which the readEvents have to be sent. |
void |
setTransport(MJCTransport transport)
Sets the MJCTransport which is responsible for the data connection between the client and the server. |
void |
setWindow(MJCWindow window)
Sets the MJCWindow that represents the user interface of the client side. |
void |
setWriteable(MJCWriteable writeable)
Sets the MJCWriteable to which this MJCWriter will write. |
boolean |
write(char c)
Writes one single char. |
boolean |
write(char[] ca)
Writes a char array. |
boolean |
write(java.lang.String s)
Writes a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MJCSSHTransportLayer()
Method Detail |
public void run()
run
in interface java.lang.Runnable
public java.lang.String getCloserName()
MJCCloser
getCloserName
in interface MJCCloser
com.monica.javacom.interfaces.MJCCloser
public java.lang.String getCloserVersion()
MJCCloser
getCloserVersion
in interface MJCCloser
com.monica.javacom.interfaces.MJCCloser
public void closeApplication()
MJCCloser
closeApplication
in interface MJCCloser
public void setTransport(MJCTransport transport)
MJCCloser
setTransport
in interface MJCCloser
com.monica.javacom.interfaces.MJCCloser
MJCTransport
- transport: the MJCTransport that is
responsible for the data connection between client and serverpublic void setWindow(MJCWindow window)
MJCCloser
setWindow
in interface MJCCloser
com.monica.javacom.interfaces.MJCCloser
MJCWindow
- window: the MJCWindow that represents the
user interface of the client sidepublic void setConfiguration(MJCConfiguration configuration)
MJCConfigureable
setConfiguration
in interface MJCConfigureable
com.monica.javacom.interfaces.MJCConfigureable
MJCConfiguration
- configuration: the MJCConfiguration
object for the customizationpublic MJCConfiguration getConfiguration()
MJCConfigureable
getConfiguration
in interface MJCConfigureable
com.monica.javacom.interfaces.MJCConfigureable
public java.lang.String getReadableName()
MJCReadable
getReadableName
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
public java.lang.String getReadableVersion()
MJCReadable
getReadableVersion
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
public int getAvailable()
MJCReadable
getAvailable
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
public java.lang.String getInput()
MJCReadable
getInput
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
public boolean isReadableConnected()
MJCReadable
isReadableConnected
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
public void setReader(MJCReader reader)
MJCReadable
setReader
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
MJCReader
- reader: the MJCReader to which the readEvents
have to be sentpublic MJCReader getReader()
MJCReadable
getReader
in interface MJCReadable
com.monica.javacom.interfaces.MJCReadable
public java.lang.String getWriteableName()
MJCWriteable
getWriteableName
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
public java.lang.String getWriteableVersion()
MJCWriteable
getWriteableVersion
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
public boolean write(char c)
MJCWriteable
write
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
char
- c: the char to be writtenpublic boolean write(char[] ca)
MJCWriteable
write
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
char[]
- c: the char array to be writtenpublic boolean write(java.lang.String s)
MJCWriteable
write
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
String
- s: the String to be writtenpublic void flush()
MJCWriteable
flush
in interface MJCWriteable
public java.lang.String getLastWriteableError()
MJCWriteable
getLastWriteableError
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
public boolean isWriteableConnected()
MJCWriteable
isWriteableConnected
in interface MJCWriteable
com.monica.javacom.interfaces.MJCWriteable
public java.lang.String getReaderName()
MJCReader
getReaderName
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
public java.lang.String getReaderVersion()
MJCReader
getReaderVersion
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
public void readEvent(MJCReadable readable)
MJCReader
readEvent
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
MJCReadable
- readable: there is data available from the
readablepublic void connectionClosedEvent(MJCReadable readable)
MJCReader
connectionClosedEvent
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
MJCReadable
- readable: the MJCReadable whose source connection
has been closedpublic void errorEvent(java.lang.String errorDesc, MJCReadable readable)
MJCReader
errorEvent
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
String
- errorDescription: the error messageMJCReadable
- readable: the MJCReadable where the error
occuredpublic void setReadable(MJCReadable readable)
MJCReader
setReadable
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
MJCReadable
- readable: the MJCReadable from which data has
to be readpublic MJCReadable getReadable()
MJCReader
getReadable
in interface MJCReader
com.monica.javacom.interfaces.MJCReader
public java.lang.String getWriterName()
MJCWriter
getWriterName
in interface MJCWriter
com.monica.javacom.interfaces.MJCWriter
public java.lang.String getWriterVersion()
MJCWriter
getWriterVersion
in interface MJCWriter
com.monica.javacom.interfaces.MJCWriter
public void setWriteable(MJCWriteable writeable)
MJCWriter
setWriteable
in interface MJCWriter
com.monica.javacom.interfaces.MJCWriter
MJCWriteable
- writeable: the MJCWriteable to which this
MJCWriter will writepublic MJCWriteable getWriteable()
MJCWriter
getWriteable
in interface MJCWriter
com.monica.javacom.interfaces.MJCWriter
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |