org.pfsw.tools.cda.darc.client
Class DARCConnection

java.lang.Object
  extended by org.pfsw.tools.cda.darc.client.BaseJMXClientConnection
      extended by org.pfsw.tools.cda.darc.client.DARCConnection
All Implemented Interfaces:
IRemoteControl

public class DARCConnection
extends BaseJMXClientConnection
implements IRemoteControl

This is the connection class that opens and closes the connection to the remote CDA application. It also provides a generic method to execute the commands against the remote application.

Version:
1.0
Author:
M.Duchrow

Field Summary
 
Fields inherited from interface org.pfsw.tools.cda.darc.IRemoteControl
DEFAULT_HOST, DEFAULT_PORT
 
Constructor Summary
DARCConnection()
          Initialize the new instance with default values.
 
Method Summary
 IParameterMap execute(CommandName command, IParameterMap parameters)
          Executes a command with the given parameters and returns a map with the result of the execution.
 
Methods inherited from class org.pfsw.tools.cda.darc.client.BaseJMXClientConnection
close, getCurrentObjectName, invoke, openConnection, openConnection, selectMBean
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DARCConnection

public DARCConnection()
Initialize the new instance with default values.

Method Detail

execute

public IParameterMap execute(CommandName command,
                             IParameterMap parameters)
Executes a command with the given parameters and returns a map with the result of the execution.

The names and values of the parameters are defined in the command reference. Any parameters that are not recognized for a particular command will be ignored.

Specified by:
execute in interface IRemoteControl
Parameters:
command - The name of the command to be executed (must not be null).
parameters - The parameter for the command (must not be null).
Returns:
A map with the result (never null).