FileDocCategorySizeDatePackage
AttrResultInfo.javaAPI DocJBoss 4.2.12204Fri Jul 13 21:02:14 BST 2007org.jboss.console.plugins.helpers.jmx

AttrResultInfo

public class AttrResultInfo extends Object
A simple tuple of an mbean operation name, sigature and result.
author
Scott.Stark@jboss.org
version
$Revision: 57191 $

Fields Summary
public String
name
public PropertyEditor
editor
public Object
result
public Throwable
throwable
Constructors Summary
public AttrResultInfo(String name, PropertyEditor editor, Object result, Throwable throwable)

      this.name = name;
      this.editor = editor;
      this.result = result;
      this.throwable = throwable;
   
Methods Summary
public java.lang.StringgetAsText()

      if (throwable != null)
      {
         return throwable.toString();
      }
      if( result != null )
      {
         try 
         {
            if( editor != null )
            {
               editor.setValue(result);
               return editor.getAsText();
            }
            else
            {
               return result.toString();
            }
         }
         catch (Exception e)
         {
            return "String representation of " + name + "unavailable";
         } // end of try-catch
      }
      return null;