JBoss AS7 Deployment Plugin 7.9.Final

org.jboss.as.plugin.common
Class AbstractServerMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.as.plugin.common.AbstractServerMojo
All Implemented Interfaces:
Closeable, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, ConnectionInfo
Direct Known Subclasses:
AddResource, Deploy, DeployArtifact, DeployOnly, ExecuteCommands, Redeploy, RedeployOnly, Shutdown, Start, Undeploy, UndeployArtifact

public abstract class AbstractServerMojo
extends org.apache.maven.plugin.AbstractMojo
implements ConnectionInfo, Closeable

The default implementation for connecting to a running AS7 instance

Author:
James R. Perkins, Stuart Douglas

Field Summary
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
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractServerMojo()
           
 
Method Summary
 void close()
           
 CallbackHandler getCallbackHandler()
          The callback handler for authentication.
 org.jboss.as.controller.client.ModelControllerClient getClient()
          Gets or creates a new connection to the server and returns the client.
 InetAddress getHostAddress()
          Creates gets the address to the host name.
 int getPort()
          The port number of the server to deploy to.
abstract  String goal()
          The goal of the deployment.
 String hostname()
          The hostname to deploy the archive to.
 boolean isDomainServer()
          Returns true if the connection is for a domain server, otherwise false.
protected  boolean isSkip()
          Indicates whether or not the goal should be skipped.
 
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
Constructor Detail

AbstractServerMojo

public AbstractServerMojo()
Method Detail

hostname

public final String hostname()
The hostname to deploy the archive to. The default is localhost.

Returns:
the hostname of the server.

getPort

public final int getPort()
The port number of the server to deploy to. The default is 9999.

Specified by:
getPort in interface ConnectionInfo
Returns:
the port number to deploy to.

isDomainServer

public final boolean isDomainServer()
Returns true if the connection is for a domain server, otherwise false.

Returns:
true if the connection is for a domain server, otherwise false

goal

public abstract String goal()
The goal of the deployment.

Returns:
the goal of the deployment.

getClient

public final org.jboss.as.controller.client.ModelControllerClient getClient()
Gets or creates a new connection to the server and returns the client.

For a domain server a DomainClient will be returned.

Returns:
the client

close

public final void close()
Specified by:
close in interface Closeable

getHostAddress

public final InetAddress getHostAddress()
Creates gets the address to the host name.

Specified by:
getHostAddress in interface ConnectionInfo
Returns:
the address.

getCallbackHandler

public final CallbackHandler getCallbackHandler()
Description copied from interface: ConnectionInfo
The callback handler for authentication.

Specified by:
getCallbackHandler in interface ConnectionInfo
Returns:
the callback handler.

isSkip

protected boolean isSkip()
Indicates whether or not the goal should be skipped.

Returns:
true to skip the goal, otherwise false

JBoss AS7 Deployment Plugin 7.9.Final

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.