Interface CompilerConnection
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ProcessConnection,SocketConnection,StreamConnection
public interface CompilerConnection extends Closeable
Abstract representation of a connection to an embedded sass compiler.- See Also:
ProcessConnection,ConnectionFactory.bundled()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Packet<com.sass_lang.embedded_protocol.OutboundMessage>readResponse()Read aOutboundMessagefrom the compiler.default voidsendMessage(int compilationId, com.sass_lang.embedded_protocol.InboundMessage inboundMessage)Send the givenInboundMessageto the compiler.voidsendMessage(Packet<com.sass_lang.embedded_protocol.InboundMessage> inboundMessagePacket)Send the givenPacketto the compiler.
-
-
-
Method Detail
-
sendMessage
default void sendMessage(int compilationId, com.sass_lang.embedded_protocol.InboundMessage inboundMessage) throws IOExceptionSend the givenInboundMessageto the compiler.- Parameters:
compilationId- The compilationId to send.inboundMessage- TheInboundMessageto send.- Throws:
IOException- If the communication with the compiler fails.
-
sendMessage
void sendMessage(Packet<com.sass_lang.embedded_protocol.InboundMessage> inboundMessagePacket) throws IOException
Send the givenPacketto the compiler.- Parameters:
inboundMessagePacket- TheInboundMessageto send.- Throws:
IOException- If the communication with the compiler fails.
-
readResponse
Packet<com.sass_lang.embedded_protocol.OutboundMessage> readResponse() throws IOException
Read aOutboundMessagefrom the compiler.- Returns:
- The next
OutboundMessagesent by the compiler. - Throws:
IOException- If the communication with the compiler fails.
-
-