use of org.jivesoftware.openfire.http.HttpBindManager in project Openfire by igniterealtime.
the class HttpBindStatus method execute.
@Override
public void execute(SessionData data, Element command) {
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.setLabel("Http Bind Enabled");
field.setVariable("httpbindenabled");
field.addValue(String.valueOf(isEnabled));
if (isEnabled) {
field = form.addField();
field.setLabel("Http Bind Address");
field.setVariable("httpbindaddress");
field.addValue(manager.getHttpBindUnsecureAddress());
field = form.addField();
field.setLabel("Http Bind Secure Address");
field.setVariable("httpbindsecureaddress");
field.addValue(manager.getHttpBindSecureAddress());
String jsUrl = manager.getJavaScriptUrl();
if (jsUrl != null) {
field = form.addField();
field.setLabel("Http Bind JavaScript Address");
field.setVariable("javascriptaddress");
field.addValue(jsUrl);
}
}
command.add(form.getElement());
}
Aggregations