com.monica.javacom.interfaces
Interface MJCWriteable

All Known Subinterfaces:
MJCCiphering, MJCProtocol, MJCTerminal, MJCTransport
All Known Implementing Classes:
MJCWriteableIsAIS, MJCWriteableHasAOS, MJCManager

public interface MJCWriteable

Implements the destination part of the write functionality in the MJC layer hierarchy. MJCWriteable is always the destination of data from the MJCWriter. Writing in the MJC layer hierarchy is synchronous. If the MJCWriter is willing to write, it calls one of the write methods of the MJCWriteable. The write will return after the data is submitted to bottom layers. Data can be buffered by the MJCWriteable.


Method Summary
 void flush()
          Flushes the contents of the write buffer to bottom layers.
 java.lang.String getLastWriteableError()
          Returns the error message of the last occured error.
 java.lang.String getWriteableName()
          Returns the MJC name of the MJCWriteable.
 java.lang.String getWriteableVersion()
          Returns the MJC version of the MJCWriteable.
 boolean isWriteableConnected()
          Returns wether the MJCWriteable is connected to its target.
 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.
 

Method Detail

getWriteableName

public java.lang.String getWriteableName()
Returns the MJC name of the MJCWriteable.
Returns:
String: the MJC name of the MJCWriteable

getWriteableVersion

public java.lang.String getWriteableVersion()
Returns the MJC version of the MJCWriteable.
Returns:
String: the MJC version of the MJCWriteable

write

public boolean write(char c)
Writes one single char. Writing is synchronous and can be buffered.
Parameters:
char - c: the char to be written
Returns:
boolean: wether the writing has been successful

write

public boolean write(java.lang.String s)
Writes a String. Writing is synchronous and can be buffered.
Parameters:
String - s: the String to be written
Returns:
boolean: wether the writing has been successful

write

public boolean write(char[] c)
Writes a char array. Writing is synchronous and can be buffered.
Parameters:
char[] - c: the char array to be written
Returns:
boolean: wether the writing has been successful

flush

public void flush()
Flushes the contents of the write buffer to bottom layers.

getLastWriteableError

public java.lang.String getLastWriteableError()
Returns the error message of the last occured error. After returning it, the error message will be deleted and cannot be queried again.
Returns:
String: the last error message

isWriteableConnected

public boolean isWriteableConnected()
Returns wether the MJCWriteable is connected to its target.
Returns:
boolean: wether the MJCWriteable is connected to its target