Interface BuildConnection
-
- All Known Implementing Classes:
TcpBuildConnection
public interface BuildConnectionABuildConnectionallow communication between a an IDE and a maven build to observe the state of the build and act on certain events. This is usually not used directly by mojos but invoked internally by other APIs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEnabled()This method allows code to perform an eager check if a buildconnection is present to send messages.Messagesend(Message message, org.apache.maven.execution.MavenSession mavenSession)Send a message and returns the reply from the other endpoint, should only be called from a maven thread!
-
-
-
Method Detail
-
send
Message send(Message message, org.apache.maven.execution.MavenSession mavenSession)
Send a message and returns the reply from the other endpoint, should only be called from a maven thread!- Parameters:
message- the message to sendmavenSession- the maven session to reference- Returns:
- the reply message or
nullif this connection is not enabled and the message was discarded.
-
isEnabled
boolean isEnabled()
This method allows code to perform an eager check if a buildconnection is present to send messages. This can be used to guard operations to prevent allocate resources or objects if the message will be dropped.- Returns:
trueif the connection can be used to send messages or if they will be discarded
-
-