org.rhq.modules.plugins.jbossas7
Class ASConnection

java.lang.Object
  extended by org.rhq.modules.plugins.jbossas7.ASConnection

public class ASConnection
extends Object

Provide connections to the AS and reading / writing date from/to it.

Author:
Heiko W. Rupp

Field Summary
static String MANAGEMENT
           
static boolean verbose
           
 
Constructor Summary
ASConnection(String host, int port, String user, String password)
          Construct an ASConnection object.
 
Method Summary
 Result execute(Operation op)
          Execute the passed Operation and return its Result.
 Result execute(Operation op, boolean isComplex)
          Execute the passed Operation and return its Result.
 ComplexResult executeComplex(Operation op)
          Execute the passed Operation and return its ComplexResult.
 org.codehaus.jackson.JsonNode executeRaw(Operation operation)
          Execute an operation against the domain api.
 String getHost()
           
 int getPort()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANAGEMENT

public static final String MANAGEMENT
See Also:
Constant Field Values

verbose

public static boolean verbose
Constructor Detail

ASConnection

public ASConnection(String host,
                    int port,
                    String user,
                    String password)
Construct an ASConnection object. The real "physical" connection is done in #executeRaw.

Parameters:
host - Host of the DomainController or standalone server
port - Port of the JSON api.
user - user needed for authentication
password - password needed for authentication
Method Detail

executeRaw

public org.codehaus.jackson.JsonNode executeRaw(Operation operation)
Execute an operation against the domain api. This method is doing the real work by talking to the remote server and sending JSON data, that is obtained by serializing the operation. Please do not use this API , but execute()

Parameters:
operation - an Operation that should be run on the domain controller
Returns:
JsonNode that describes the result
See Also:
execute(org.rhq.modules.plugins.jbossas7.json.Operation), execute(org.rhq.modules.plugins.jbossas7.json.Operation, boolean), executeComplex(org.rhq.modules.plugins.jbossas7.json.Operation)

execute

public Result execute(Operation op)
Execute the passed Operation and return its Result. This is a shortcut of #execute(Operation, false)

Parameters:
op - Operation to execute
Returns:
Result of the execution
See Also:
execute(org.rhq.modules.plugins.jbossas7.json.Operation, boolean)

executeComplex

public ComplexResult executeComplex(Operation op)
Execute the passed Operation and return its ComplexResult. This is a shortcut of #execute(Operation, true)

Parameters:
op - Operation to execute
Returns:
ComplexResult of the execution
See Also:
execute(org.rhq.modules.plugins.jbossas7.json.Operation, boolean)

execute

public Result execute(Operation op,
                      boolean isComplex)
Execute the passed Operation and return its Result. Depending on isComplex the return type is a simple Result or a ComplexResult

Parameters:
op - Operation to execute
isComplex - should a complex result be returned?
Returns:
ComplexResult of the execution

getHost

public String getHost()

getPort

public int getPort()


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.