class ComponentSessionTask extends RemoteSessionTask {
    private JID address;

    public ComponentSessionTask() {
    }

    protected ComponentSessionTask(JID address, Operation operation) {
        super(operation);
        this.address = address;
    }

    Session getSession() {
        return SessionManager.getInstance().getComponentSession(address.getDomain());
    }

    public void run() {<FILL_FUNCTION_BODY>}

    public void writeExternal(ObjectOutput out) throws IOException {
        super.writeExternal(out);
        ExternalizableUtil.getInstance().writeSerializable(out, address);
    }

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        super.readExternal(in);
        address = (JID) ExternalizableUtil.getInstance().readSerializable(in);
    }

    public String toString() {
        return super.toString() + " operation: " + operation + " address: " + address;
    }
}

        super.run();
        if (operation == Operation.getType) {
            result = ((ComponentSession) getSession()).getExternalComponent().getType();
        }
        else if (operation == Operation.getCategory) {
            result = ((ComponentSession) getSession()).getExternalComponent().getCategory();
        }
        else if (operation == Operation.getInitialSubdomain) {
            result = ((ComponentSession) getSession()).getExternalComponent().getInitialSubdomain();
        }
        else if (operation == Operation.getSubdomains) {
            result = ((ComponentSession) getSession()).getExternalComponent().getSubdomains();
        }
        else if (operation == Operation.getName) {
            result = ((ComponentSession) getSession()).getExternalComponent().getName();
        }
        else if (operation == Operation.getDescription) {
            result = ((ComponentSession) getSession()).getExternalComponent().getDescription();
        }
        else if (operation == Operation.start) {
            ((ComponentSession) getSession()).getExternalComponent().start();
        }
        else if (operation == Operation.shutdown) {
            ((ComponentSession) getSession()).getExternalComponent().shutdown();
        }
    
<methods>public void <init>() ,public java.lang.Object getResult() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void run() ,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private static final Logger Log,protected org.jivesoftware.openfire.session.RemoteSessionTask.Operation operation,protected java.lang.Object result