|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.monica.javacom.protocol.MJCTelnetProtocol
Implements TELNET protocol functionality in the MJC layer hierarchy. See the TELNET description in RFC 854. This class does currently implement the following TELNET commands/functionality:
Constructor Summary | |
MJCTelnetProtocol()
Contstructor |
Method Summary | |
void |
connectionClosedEvent(MJCReadable readable)
Indicates that the source connection of the specified MJCReadable has been closed. |
void |
errorEvent(java.lang.String errorDescription,
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. |
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. |
java.lang.String |
getProtocolName()
Returns the MJC name of the MJCProtocol. |
java.lang.String |
getProtocolVersion()
Returns the MJC version of the MJCProtocol. |
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 |
send(java.lang.String s)
Send a string through the Telnet protocol |
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 |
setWriteable(MJCWriteable writeable)
Sets the MJCWriteable to which this MJCWriter will write. |
boolean |
write(char c)
Writes one single char. |
boolean |
write(char[] c)
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 MJCTelnetProtocol()
Method Detail |
public java.lang.String getProtocolName()
getProtocolName
in interface MJCProtocol
public java.lang.String getProtocolVersion()
getProtocolVersion
in interface MJCProtocol
public java.lang.String getWriterName()
getWriterName
in interface MJCWriter
public java.lang.String getWriterVersion()
getWriterVersion
in interface MJCWriter
public void setWriteable(MJCWriteable writeable)
setWriteable
in interface MJCWriter
MJCWriteable
- writeable: the MJCWriteable to which this
MJCWriter will writepublic MJCWriteable getWriteable()
getWriteable
in interface MJCWriter
public java.lang.String getWriteableName()
getWriteableName
in interface MJCWriteable
public java.lang.String getWriteableVersion()
getWriteableVersion
in interface MJCWriteable
public boolean write(char c)
write
in interface MJCWriteable
char
- c: the char to be writtenpublic boolean write(java.lang.String s)
write
in interface MJCWriteable
String
- s: the String to be writtenpublic boolean write(char[] c)
write
in interface MJCWriteable
char[]
- c: the char array to be writtenpublic void flush()
flush
in interface MJCWriteable
public java.lang.String getLastWriteableError()
getLastWriteableError
in interface MJCWriteable
public boolean isWriteableConnected()
isWriteableConnected
in interface MJCWriteable
public java.lang.String getReaderName()
getReaderName
in interface MJCReader
public java.lang.String getReaderVersion()
getReaderVersion
in interface MJCReader
public void readEvent(MJCReadable readable)
readEvent
in interface MJCReader
MJCReadable
- readable: there is data available from the
readablepublic void connectionClosedEvent(MJCReadable readable)
connectionClosedEvent
in interface MJCReader
MJCReadable
- readable: the MJCReadable whose source connection
has been closedpublic void errorEvent(java.lang.String errorDescription, MJCReadable readable)
errorEvent
in interface MJCReader
String
- errorDescription: the error messageMJCReadable
- readable: the MJCReadable where the error
occuredpublic void setReadable(MJCReadable readable)
setReadable
in interface MJCReader
MJCReadable
- readable: the MJCReadable from which data has
to be readpublic MJCReadable getReadable()
getReadable
in interface MJCReader
public void setConfiguration(MJCConfiguration configuration)
setConfiguration
in interface MJCConfigureable
MJCConfiguration
- configuration: the MJCConfiguration
object for the customizationpublic MJCConfiguration getConfiguration()
getConfiguration
in interface MJCConfigureable
public java.lang.String getReadableName()
getReadableName
in interface MJCReadable
public java.lang.String getReadableVersion()
getReadableVersion
in interface MJCReadable
public int getAvailable()
getAvailable
in interface MJCReadable
public java.lang.String getInput()
getInput
in interface MJCReadable
public boolean isReadableConnected()
isReadableConnected
in interface MJCReadable
public void setReader(MJCReader reader)
setReader
in interface MJCReadable
MJCReader
- reader: the MJCReader to which the readEvents
have to be sentpublic MJCReader getReader()
getReader
in interface MJCReadable
public void send(java.lang.String s)
String
- s: the String to be sent through the Telnet protocol
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |