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 aOutboundMessage
from the compiler.default void
sendMessage(int compilationId, com.sass_lang.embedded_protocol.InboundMessage inboundMessage)
Send the givenInboundMessage
to the compiler.void
sendMessage(Packet<com.sass_lang.embedded_protocol.InboundMessage> inboundMessagePacket)
Send the givenPacket
to the compiler.
-
-
-
Method Detail
-
sendMessage
default void sendMessage(int compilationId, com.sass_lang.embedded_protocol.InboundMessage inboundMessage) throws IOException
Send the givenInboundMessage
to the compiler.- Parameters:
compilationId
- The compilationId to send.inboundMessage
- TheInboundMessage
to 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 givenPacket
to the compiler.- Parameters:
inboundMessagePacket
- TheInboundMessage
to send.- Throws:
IOException
- If the communication with the compiler fails.
-
readResponse
Packet<com.sass_lang.embedded_protocol.OutboundMessage> readResponse() throws IOException
Read aOutboundMessage
from the compiler.- Returns:
- The next
OutboundMessage
sent by the compiler. - Throws:
IOException
- If the communication with the compiler fails.
-
-