Interface BuildConnection
- All Known Implementing Classes:
TcpBuildConnection
public interface BuildConnection
A
BuildConnection allow 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
Modifier and TypeMethodDescriptionbooleanThis method allows code to perform an eager check if a buildconnection is present to send messages.Send a message and returns the reply from the other endpoint, should only be called from a maven thread!
-
Method Details
-
send
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
-