Class StreamConnection
java.lang.Object
de.larsgrefer.sass.embedded.connection.StreamConnection
- All Implemented Interfaces:
CompilerConnection
,Closeable
,AutoCloseable
- Direct Known Subclasses:
ProcessConnection
,SocketConnection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InputStream
protected abstract OutputStream
sass.embedded_protocol.EmbeddedSass.OutboundMessage
Read aEmbeddedSass.OutboundMessage
from the compiler.void
sendMessage
(sass.embedded_protocol.EmbeddedSass.InboundMessage inboundMessage) Send the givenEmbeddedSass.InboundMessage
to the compiler.
-
Constructor Details
-
StreamConnection
public StreamConnection()
-
-
Method Details
-
getInputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
sendMessage
public void sendMessage(sass.embedded_protocol.EmbeddedSass.InboundMessage inboundMessage) throws IOException Description copied from interface:CompilerConnection
Send the givenEmbeddedSass.InboundMessage
to the compiler.- Specified by:
sendMessage
in interfaceCompilerConnection
- Parameters:
inboundMessage
- TheEmbeddedSass.InboundMessage
to send.- Throws:
IOException
- If the communication with the compiler fails.
-
readResponse
Description copied from interface:CompilerConnection
Read aEmbeddedSass.OutboundMessage
from the compiler.- Specified by:
readResponse
in interfaceCompilerConnection
- Returns:
- The next
EmbeddedSass.OutboundMessage
sent by the compiler. - Throws:
IOException
- If the communication with the compiler fails.
-