com.bea.jvm
Class DiagnosticCommand.Command

java.lang.Object
  extended by com.bea.jvm.DiagnosticCommand.Command
All Implemented Interfaces:
Describable
Enclosing class:
DiagnosticCommand

public class DiagnosticCommand.Command
extends java.lang.Object
implements Describable

This class wraps a named Command in the JVM Use this Object for repeated invocations of a command, or reflective operations, such as DiagnosticCommand.Parameter introspection


Method Summary
 java.lang.String execute()
          Runs this command.
 java.lang.String execute(java.util.Collection params)
          Runs this command with the provided parameters
 void execute(java.util.Collection params, java.io.OutputStream os)
          Runs this command with the provided parameters
 java.lang.String execute(java.util.Map params)
          Runs this command with the provided parameters
 void execute(java.util.Map params, java.io.OutputStream os)
          Runs this command with the provided parameters
 void execute(java.io.OutputStream os)
          Runs this command.
 java.lang.String execute(java.lang.String params)
          Runs this command with the provided parameters.
 void execute(java.lang.String params, java.io.OutputStream os)
          Runs this command with the provided parameters.
 void executeDefault()
          Runs this command.
 void executeDefault(java.util.Collection params)
          Runs this command with the provided parameters
 void executeDefault(java.util.Map params)
          Runs this command with the provided parameters
 void executeDefault(java.lang.String params)
          Runs this command with the provided parameters.
 java.lang.String getDescription()
          Returns a description of the object.
 java.lang.String getName()
           
 java.util.Collection getParameters()
           
 java.lang.String help()
          Returns help for this command as String
 void help(java.io.OutputStream os)
          Prints help to OutputStream
 void helpDefault()
          Prints the help text for this command on default output
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

execute

public java.lang.String execute(java.lang.String params)
                         throws java.lang.IllegalArgumentException,
                                java.lang.RuntimeException
Runs this command with the provided parameters.

Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException
See Also:
DiagnosticCommand.execute(String,String)

execute

public java.lang.String execute(java.util.Collection params)
                         throws java.lang.IllegalArgumentException,
                                java.lang.RuntimeException
Runs this command with the provided parameters

Parameters:
params - a Collections of DiagnosticCommand.Parameter
Returns:
Command result as String
Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException

execute

public java.lang.String execute(java.util.Map params)
                         throws java.lang.IllegalArgumentException,
                                java.lang.RuntimeException
Runs this command with the provided parameters

Parameters:
params - a Map of String,Object
Returns:
Command result as String
Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException

execute

public java.lang.String execute()
                         throws java.lang.IllegalArgumentException,
                                java.lang.RuntimeException
Runs this command.

Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException
See Also:
DiagnosticCommand.execute(java.lang.String, java.io.OutputStream)

help

public java.lang.String help()
Returns help for this command as String


executeDefault

public void executeDefault(java.lang.String params)
                    throws java.lang.IllegalArgumentException,
                           java.lang.RuntimeException
Runs this command with the provided parameters.

Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException
See Also:
DiagnosticCommand.executeDefault(java.lang.String)

executeDefault

public void executeDefault(java.util.Collection params)
                    throws java.lang.IllegalArgumentException,
                           java.lang.RuntimeException
Runs this command with the provided parameters

Parameters:
params - a Collections of DiagnosticCommand.Parameter
Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException

executeDefault

public void executeDefault(java.util.Map params)
                    throws java.lang.IllegalArgumentException,
                           java.lang.RuntimeException
Runs this command with the provided parameters

Parameters:
params - a Map of String,Object
Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException

executeDefault

public void executeDefault()
                    throws java.lang.IllegalArgumentException,
                           java.lang.RuntimeException
Runs this command.

Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException
See Also:
DiagnosticCommand.executeDefault(java.lang.String)

helpDefault

public void helpDefault()
Prints the help text for this command on default output


execute

public void execute(java.lang.String params,
                    java.io.OutputStream os)
             throws java.io.IOException,
                    java.lang.IllegalArgumentException,
                    java.lang.RuntimeException
Runs this command with the provided parameters.

Throws:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.RuntimeException
See Also:
DiagnosticCommand.execute(String,String,OutputStream)

execute

public void execute(java.util.Collection params,
                    java.io.OutputStream os)
             throws java.io.IOException,
                    java.lang.IllegalArgumentException,
                    java.lang.RuntimeException
Runs this command with the provided parameters

Parameters:
params - a Collections of DiagnosticCommand.Parameter
Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException
java.io.IOException

execute

public void execute(java.util.Map params,
                    java.io.OutputStream os)
             throws java.io.IOException,
                    java.lang.IllegalArgumentException,
                    java.lang.RuntimeException
Runs this command with the provided parameters

Parameters:
params - a Map of String,Object
Throws:
java.lang.IllegalArgumentException
java.lang.RuntimeException
java.io.IOException

execute

public void execute(java.io.OutputStream os)
             throws java.io.IOException,
                    java.lang.IllegalArgumentException,
                    java.lang.RuntimeException
Runs this command.

Throws:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.RuntimeException
See Also:
DiagnosticCommand.execute(String,OutputStream)

help

public void help(java.io.OutputStream os)
          throws java.io.IOException
Prints help to OutputStream

Throws:
java.io.IOException

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()
Description copied from interface: Describable
Returns a description of the object. This description can be more specific than Object.toString().

Specified by:
getDescription in interface Describable
Returns:
the description as a String.

getParameters

public java.util.Collection getParameters()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1999, 2008, Oracle and/or its affiliates. All rights reserved.