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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isEnabled()
      This method allows code to perform an eager check if a buildconnection is present to send messages.
      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!
    • 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 send
        mavenSession - the maven session to reference
        Returns:
        the reply message or null if 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:
        true if the connection can be used to send messages or if they will be discarded