Package org.wildfly.plugin.common

## Class AbstractServerConnection

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.wildfly.plugin.common.AbstractServerConnection

- All Implemented Interfaces:
    `org.apache.maven.plugin.ContextEnabled`, `org.apache.maven.plugin.Mojo`
  Direct Known Subclasses:
    `AbstractStartMojo`, `AddResourceMojo`, `DeployArtifactMojo`, `DeployMojo`, `ExecuteCommandsMojo`, `RedeployMojo`, `ShutdownMojo`, `UndeployArtifactMojo`, `UndeployMojo`

      public abstract class AbstractServerConnection
      extends org.apache.maven.plugin.AbstractMojo

  The default implementation for connecting to a running WildFly instance
  Author:
    James R. Perkins, Stuart Douglas

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `DEBUG_MESSAGE_NO_CREDS` |
    `static String` | `DEBUG_MESSAGE_NO_ID` |
    `static String` | `DEBUG_MESSAGE_NO_SERVER_SECTION` |
    `static String` | `DEBUG_MESSAGE_NO_SETTINGS_FILE` |
    `static String` | `DEBUG_MESSAGE_POM_HAS_CREDS` |
    `static String` | `DEBUG_MESSAGE_SETTINGS_HAS_CREDS` |
    `static String` | `DEBUG_MESSAGE_SETTINGS_HAS_ID` |
    `protected int` | `timeout` | The timeout, in seconds, to wait for a management connection.

    - ### Fields inherited from interface org.apache.maven.plugin.Mojo

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractServerConnection()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected org.jboss.as.controller.client.ModelControllerClient` | `createClient()` | Creates a new client.
    `protected MavenModelControllerClientConfiguration` | `getClientConfiguration()` | Gets a client configuration used to create a new `ModelControllerClient`.
    `protected String` | `getManagementHostName()` |
    `protected int` | `getManagementPort()` |
    `abstract String` | `goal()` | The goal of the deployment.

    - ### Methods inherited from class org.apache.maven.plugin.AbstractMojo

      `getLog, getPluginContext, setLog, setPluginContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.maven.plugin.Mojo

      `execute`

- - ### Field Detail

    - #### DEBUG_MESSAGE_NO_CREDS

          public static final String DEBUG_MESSAGE_NO_CREDS

      See Also:
        Constant Field Values

    - #### DEBUG_MESSAGE_NO_ID

          public static final String DEBUG_MESSAGE_NO_ID

      See Also:
        Constant Field Values

    - #### DEBUG_MESSAGE_NO_SERVER_SECTION

          public static final String DEBUG_MESSAGE_NO_SERVER_SECTION

      See Also:
        Constant Field Values

    - #### DEBUG_MESSAGE_NO_SETTINGS_FILE

          public static final String DEBUG_MESSAGE_NO_SETTINGS_FILE

      See Also:
        Constant Field Values

    - #### DEBUG_MESSAGE_POM_HAS_CREDS

          public static final String DEBUG_MESSAGE_POM_HAS_CREDS

      See Also:
        Constant Field Values

    - #### DEBUG_MESSAGE_SETTINGS_HAS_CREDS

          public static final String DEBUG_MESSAGE_SETTINGS_HAS_CREDS

      See Also:
        Constant Field Values

    - #### DEBUG_MESSAGE_SETTINGS_HAS_ID

          public static final String DEBUG_MESSAGE_SETTINGS_HAS_ID

      See Also:
        Constant Field Values

    - #### timeout

          @Parameter(property="wildfly.timeout",
                     defaultValue="60")
          protected int timeout

      The timeout, in seconds, to wait for a management connection.

  - ### Constructor Detail

    - #### AbstractServerConnection

          public AbstractServerConnection()

  - ### Method Detail

    - #### goal

          public abstract String goal()

      The goal of the deployment.
      Returns:
        the goal of the deployment.

    - #### createClient

          protected org.jboss.as.controller.client.ModelControllerClient createClient()

      Creates a new client.
      Returns:
        the client

    - #### getClientConfiguration

          protected MavenModelControllerClientConfiguration getClientConfiguration()

      Gets a client configuration used to create a new `ModelControllerClient`.
      Returns:
        the configuration to use

    - #### getManagementPort

          protected int getManagementPort()

    - #### getManagementHostName

          protected String getManagementHostName()