// Path: src/main/java/org/jsoftware/tjconsole/command/CommandAction.java
// public interface CommandAction {
// 
//     void doAction(TJContext tjContext, Output output) throws Exception;
// 
// }


import org.apache.commons.beanutils.ConvertUtils;
import org.jsoftware.tjconsole.command.CommandAction;
import javax.management.*;
import java.io.IOException;
import java.util.*;

    public ObjectName getObjectName() {
        return objectName;
    }

    public void setObjectName(ObjectName objectName) {
        this.objectName = objectName;
    }

    public boolean isConnected() {
        return serverConnection != null;
    }

    public List<MBeanAttributeInfo> getAttributes() throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException {
        if (serverConnection == null || objectName == null) {
            return Collections.emptyList();
        }
        MBeanInfo beanInfo = serverConnection.getMBeanInfo(objectName);
        return Arrays.asList(beanInfo.getAttributes());
    }

    public boolean isBeanSelected() {
        return objectName != null;
    }


    public Object getServerURL() {
        return serverURL;
    }

// Path: src/main/java/org/jsoftware/tjconsole/command/CommandAction.java
// public interface CommandAction {
// 
//     void doAction(TJContext tjContext, Output output) throws Exception;
// 
// }


// Path: src/main/java/org/jsoftware/tjconsole/TJContext.java
import org.apache.commons.beanutils.ConvertUtils;
import org.jsoftware.tjconsole.command.CommandAction;
import javax.management.*;
import java.io.IOException;
import java.util.*;


    public ObjectName getObjectName() {
        return objectName;
    }

    public void setObjectName(ObjectName objectName) {
        this.objectName = objectName;
    }

    public boolean isConnected() {
        return serverConnection != null;
    }

    public List<MBeanAttributeInfo> getAttributes() throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException {
        if (serverConnection == null || objectName == null) {
            return Collections.emptyList();
        }
        MBeanInfo beanInfo = serverConnection.getMBeanInfo(objectName);
        return Arrays.asList(beanInfo.getAttributes());
    }

    public boolean isBeanSelected() {
        return objectName != null;
    }


    public Object getServerURL() {
        return serverURL;
    }

    public void fail(CommandAction action, int code) {