@Override
    public void execute(@Nonnull final SessionData data, Element command) {
        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());
    }
AdHoc command to return the current status of the HTTP-bind service. The command returns whether
the service is currently enabled, if it is enabled it will return the HTTP address on
which the service can be reached.

@author Alexander Wenckus
xmppserver/src/main/java/org/jivesoftware/openfire/commands/admin/HttpBindStatus.java