class HttpBindStatus extends AdHocCommand {
    @Override
    public String getCode() {
        return "http://jabber.org/protocol/admin#status-http-bind";
    }

    @Override
    public String getDefaultLabel() {
        return LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.label");
    }

    @Override
    public int getMaxStages(@Nonnull final SessionData data) {
        return 0;
    }

    @Override
    public void execute(@Nonnull final SessionData data, Element command) {<FILL_FUNCTION_BODY>}

    @Override
    protected void addStageInformation(@Nonnull final SessionData data, Element command) {
        // no stages, do nothing.
    }

    @Override
    protected List<Action> getActions(@Nonnull final SessionData data) {
        return Collections.emptyList();
    }

    @Override
    protected Action getExecuteAction(@Nonnull final SessionData data) {
        return null;
    }


    @Override
    public boolean hasPermission(JID requester) {
        return super.hasPermission(requester) || InternalComponentManager.getInstance().hasComponent(requester);
    }
}

        final Locale preferredLocale = SessionManager.getInstance().getLocaleForSession(data.getOwner());

        DataForm form = new DataForm(DataForm.Type.result);

        FormField field = form.addField();
        field.setType(FormField.Type.hidden);
        field.setVariable("FORM_TYPE");
        field.addValue("http://jabber.org/protocol/admin");

        HttpBindManager manager = HttpBindManager.getInstance();
        boolean isEnabled = manager.isHttpBindEnabled();
        field = form.addField();
        field.setType(FormField.Type.boolean_type);
        field.setLabel(LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.form.field.httpbindenabled.label", preferredLocale));
        field.setVariable("httpbindenabled");
        field.addValue(String.valueOf(isEnabled));

        if (isEnabled) {
            field = form.addField();
            field.setType(FormField.Type.text_single);
            field.setLabel(LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.form.field.httpbindaddress.label", preferredLocale));
            field.setVariable("httpbindaddress");
            field.addValue(manager.getHttpBindUnsecureAddress());

            field = form.addField();
            field.setType(FormField.Type.text_single);
            field.setLabel(LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.form.field.httpbindsecureaddress.label", preferredLocale));
            field.setVariable("httpbindsecureaddress");
            field.addValue(manager.getHttpBindSecureAddress());

            String jsUrl = manager.getJavaScriptUrl();
            if (jsUrl != null) {
                field = form.addField();
                field.setType(FormField.Type.text_single);
                field.setLabel(LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.form.field.javascriptaddress.label", preferredLocale));
                field.setVariable("javascriptaddress");
                field.addValue(jsUrl);
            }

            field = form.addField();
            field.setType(FormField.Type.text_single);
            field.setLabel(LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.form.field.websocketaddress.label", preferredLocale));
            field.setVariable("websocketaddress");
            field.addValue(manager.getWebsocketUnsecureAddress());

            field = form.addField();
            field.setType(FormField.Type.text_single);
            field.setLabel(LocaleUtils.getLocalizedString("commands.admin.httpbindstatus.form.field.websocketsecureaddress.label", preferredLocale));
            field.setVariable("websocketsecureaddress");
            field.addValue(manager.getWebsocketSecureAddress());
        }

        command.add(form.getElement());
    
<methods>public void <init>() ,public void addNextStageInformation(org.jivesoftware.openfire.commands.SessionData, Element) ,public void addPreviousStageInformation(org.jivesoftware.openfire.commands.SessionData, Element) ,public abstract void execute(org.jivesoftware.openfire.commands.SessionData, Element) ,public abstract java.lang.String getCode() ,public abstract java.lang.String getDefaultLabel() ,public java.lang.String getLabel() ,public abstract int getMaxStages(org.jivesoftware.openfire.commands.SessionData) ,public boolean hasPermission(JID) ,public void setLabel(java.lang.String) <variables>private java.lang.String label