com.monica.javacom.interfaces
Interface MJCReadable

All Known Subinterfaces:
MJCCiphering, MJCProtocol, MJCTransport
All Known Implementing Classes:
MJCReadableIsAOS, MJCReadableHasAIS, MJCManager

public interface MJCReadable

Implements the source part of the read functionality in the MJC layer hierarchy. MJCReadable is always the source of data for an MJCReader. Reading in the MJC layer hierarchy is asynchronous. If there is data available from the MJCReadable, the readEvent of the MJCReader is called. Which then can read through the getInput method of the MJCReadable. Data during the time between the readEvent and getInput will be buffered.


Method Summary
 int getAvailable()
          Returns the number of bytes that are available for read out from this MJCReadable.
 java.lang.String getInput()
          Returns the contents of the read buffer from this MJCReadable.
 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.
 boolean isReadableConnected()
          Returns wether the MJCReadable is still connected to its source.
 void setReader(MJCReader reader)
          Sets the MJCReader to which the readEvents have to be sent.
 

Method Detail

getReadableName

public java.lang.String getReadableName()
Returns the MJC name of the MJCReadable.
Returns:
String: the MJC name of the MJCReadable

getReadableVersion

public java.lang.String getReadableVersion()
Returns the MJC version of the MJCReadable.
Returns:
String: the MJC version of the MJCReadable

getAvailable

public int getAvailable()
Returns the number of bytes that are available for read out from this MJCReadable.
Returns:
int: the number of bytes available for read out

getInput

public java.lang.String getInput()
Returns the contents of the read buffer from this MJCReadable.
Returns:
String: the contents of the read buffer

isReadableConnected

public boolean isReadableConnected()
Returns wether the MJCReadable is still connected to its source.
Returns:
boolean: wether the MJCReadable is still connected to its source

setReader

public void setReader(MJCReader reader)
Sets the MJCReader to which the readEvents have to be sent.
Parameters:
MJCReader - reader: the MJCReader to which the readEvents have to be sent

getReader

public MJCReader getReader()
Returns the MJCReader to which readEvents will be sent.
Returns:
MJCReader: the MJCReader to which readEvents will be sent