Class StreamConnection
- java.lang.Object
-
- de.larsgrefer.sass.embedded.connection.StreamConnection
-
- All Implemented Interfaces:
CompilerConnection,Closeable,AutoCloseable
- Direct Known Subclasses:
ProcessConnection,SocketConnection
public abstract class StreamConnection extends Object implements CompilerConnection
-
-
Constructor Summary
Constructors Constructor Description StreamConnection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract InputStreamgetInputStream()protected abstract OutputStreamgetOutputStream()Packet<com.sass_lang.embedded_protocol.OutboundMessage>readResponse()Read aOutboundMessagefrom the compiler.voidsendMessage(Packet<com.sass_lang.embedded_protocol.InboundMessage> packet)Send the givenPacketto the compiler.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.larsgrefer.sass.embedded.connection.CompilerConnection
sendMessage
-
-
-
-
Method Detail
-
getInputStream
protected abstract InputStream getInputStream() throws IOException
- Throws:
IOException
-
getOutputStream
protected abstract OutputStream getOutputStream() throws IOException
- Throws:
IOException
-
sendMessage
public void sendMessage(Packet<com.sass_lang.embedded_protocol.InboundMessage> packet) throws IOException
Description copied from interface:CompilerConnectionSend the givenPacketto the compiler.- Specified by:
sendMessagein interfaceCompilerConnection- Parameters:
packet- TheInboundMessageto send.- Throws:
IOException- If the communication with the compiler fails.
-
readResponse
public Packet<com.sass_lang.embedded_protocol.OutboundMessage> readResponse() throws IOException
Description copied from interface:CompilerConnectionRead aOutboundMessagefrom the compiler.- Specified by:
readResponsein interfaceCompilerConnection- Returns:
- The next
OutboundMessagesent by the compiler. - Throws:
IOException- If the communication with the compiler fails.
-
-