Package zleurtor.scanmanager.model
Class AbstractCommunicator
java.lang.Object
zleurtor.scanmanager.model.AbstractCommunicator
The mother class of entity objects that can communicate (ie read/write messages).
- Author:
- Zleurtor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractMessage
Read a message from the specified input stream.protected void
writeMessage
(OutputStream out, AbstractMessage message) Write the specified message into the specified output stream.
-
Constructor Details
-
AbstractCommunicator
public AbstractCommunicator()
-
-
Method Details
-
readMessage
Read a message from the specified input stream.- Parameters:
in
- The input stream from which the next message shall be read.- Returns:
- The next message in the specified stream.
- Throws:
IOException
- If any exception occurs.
-
writeMessage
Write the specified message into the specified output stream.- Parameters:
out
- The output stream into which the next message shall be written.message
- The message which shall be written.- Throws:
IOException
- If any exception occurs.
-