public enum Command extends Enum<Command>
Modifier and Type | Class and Description |
---|---|
static class |
Command.Action
Ad-hoc command actions ad defined in the XEP-0050.
|
static class |
Command.Builder |
static class |
Command.DataType
Data form-types as defined in the XEP-0050.
|
static class |
Command.Status
Ad-hoc command statuses as defined in the XEP-0050.
|
Enum Constant and Description |
---|
BROADCAST_TO_ALL
Command used to set a broadcast message to all registered local users.
|
BROADCAST_TO_ONLINE
Command used to set a broadcast message to all online users.
|
CHECK_USER_CONNECTION
Sends a command from SM to the connection holder to confirm whether the connection is still active.
|
CLOSE
Command sent from the session manager to a client manager to close the client connection.
|
GETDISCO
This is depreciated command sent between components in the Tigase server for service discovery handling.
|
GETFEATURES
Command sent between a connection manager and the session manager to retrieve stream features.
|
GETSTATS
Command used by the StatisticsCollector to provide server statistics through ad-hoc command.
|
OTHER
Identifies all other, not predefined commands.
|
REDIRECT
Command used to redirect packets from a connection manager to other than default session manager.
|
STARTTLS
Command sent from the session manager to a connection manager to start TLS handshaking over the client
connection.
|
STARTZLIB
Command sent from the session manager to a connection manager to start zlib compression on the connection
stream.
|
STREAM_CLOSED
Command sent from a connection manager to the session manager when a connection or stream has been closed.
|
STREAM_CLOSED_UPDATE |
STREAM_FINISHED
Command sent from a connection manager to the session manager after last packet from closed connection stream has
been sent.
|
STREAM_MOVED
Command sent to SessionManager to change connectionId of existing session.
|
STREAM_OPENED
Command sent from a connection manager to the session manager when a new stream from the client has been opened.
|
TLS_HANDSHAKE_COMPLETE
Command sent from connection manager to the session manager after TLS handshake if client sent certificate.
|
USER_LOGIN
Command sent from session manager to the connection manager after successful user login.
|
USER_STATUS
Command sent to the session manager from an external entity to activate a user session with the connection
end-point at the given address.
|
VHOSTS_RELOAD
Command sent to the VHostManager to reload virtual hosts from the database.
|
VHOSTS_REMOVE
Command sent to the VHostManager to remove existing virtual host.
|
VHOSTS_UPDATE
Command sent to the VHostManager to add or update existing virtual host.
|
Modifier and Type | Field and Description |
---|---|
static String |
COMMAND_EL |
static String |
FIELD_EL
Deprecated.
|
protected static String[] |
FIELD_VALUE_PATH
Deprecated.
|
static String |
VALUE_EL
Deprecated.
|
static String |
XMLNS |
Modifier and Type | Method and Description |
---|---|
static void |
addAction(Packet packet,
Command.Action action) |
static void |
addCheckBoxField(Packet packet,
String f_name,
boolean f_value) |
static void |
addFieldMultiValue(Packet packet,
String f_name,
List<String> f_value)
A simple method for adding a multi-line (text-multi) data field to the command data form.
|
static void |
addFieldMultiValue(Packet packet,
String f_name,
List<String> f_value,
String label) |
static void |
addFieldMultiValue(Packet packet,
String f_name,
Throwable ex) |
static void |
addFieldValue(Packet packet,
String f_name,
String f_value)
Simple method for adding a new field to the command data form.
|
static void |
addFieldValue(Packet packet,
String f_name,
String[] f_values,
String label,
String[] labels,
String[] options)
This method allows to add a new multi-option-select-many data field to the command data form.
|
static void |
addFieldValue(Packet packet,
String f_name,
String f_value,
String type) |
static void |
addFieldValue(Packet packet,
String f_name,
String f_value,
String type,
String label) |
static void |
addFieldValue(Packet packet,
String f_name,
String f_value,
String label,
String[] labels,
String[] options)
This method allows to add a new multi-option-select-one data field to the command data form.
|
static void |
addFieldValue(Packet packet,
String f_name,
String f_value,
String label,
String[] labels,
String[] options,
String type) |
static void |
addHiddenField(Packet packet,
String f_name,
String f_value) |
static void |
addInstructions(Packet packet,
String instructions) |
static void |
addNote(Packet packet,
String note) |
static void |
addTextField(Packet packet,
String f_name,
String f_value) |
static void |
addTitle(Packet packet,
String title) |
protected static Element |
createCommandEl(String node,
Command.DataType data_type) |
static Element |
createIqCommand(JID from,
JID to,
StanzaType type,
String id,
String node,
Command.DataType data_type) |
static Command.Action |
getAction(Packet packet) |
static boolean |
getCheckBoxFieldValue(Packet packet,
String f_name) |
static List<Element> |
getData(Packet packet) |
static Element |
getData(Packet packet,
String el_name,
String xmlns) |
static String |
getFieldKeyStartingWith(Packet packet,
String f_name) |
static String |
getFieldValue(Packet packet,
String f_name) |
static String |
getFieldValue(Packet packet,
String f_name,
boolean debug) |
static String[] |
getFieldValues(Packet packet,
String f_name) |
Packet |
getPacket(JID from,
JID to,
StanzaType type,
String id)
Method returns instance of a Packet with command element added.
|
Packet |
getPacket(JID from,
JID to,
StanzaType type,
String id,
Command.DataType data_type)
Method returns instance of a Packet with command element added.
|
static boolean |
removeFieldValue(Packet packet,
String f_name) |
static void |
setData(Packet packet,
Element data) |
static void |
setData(Packet packet,
List<Element> data) |
static void |
setStatus(Packet packet,
Command.Status status) |
static Command |
valueof(String cmd) |
static Command |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Command[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Command STREAM_OPENED
public static final Command TLS_HANDSHAKE_COMPLETE
public static final Command USER_LOGIN
public static final Command STREAM_CLOSED
public static final Command STREAM_CLOSED_UPDATE
public static final Command STREAM_FINISHED
public static final Command CHECK_USER_CONNECTION
public static final Command STARTTLS
public static final Command STARTZLIB
public static final Command GETFEATURES
public static final Command GETDISCO
public static final Command CLOSE
public static final Command GETSTATS
public static final Command USER_STATUS
public static final Command BROADCAST_TO_ONLINE
public static final Command BROADCAST_TO_ALL
public static final Command REDIRECT
public static final Command VHOSTS_RELOAD
public static final Command VHOSTS_UPDATE
public static final Command VHOSTS_REMOVE
public static final Command STREAM_MOVED
public static final Command OTHER
public static final String COMMAND_EL
@Deprecated public static final String FIELD_EL
@Deprecated public static final String VALUE_EL
public static final String XMLNS
@Deprecated protected static final String[] FIELD_VALUE_PATH
public static Command[] values()
for (Command c : Command.values()) System.out.println(c);
public static Command valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static void addAction(Packet packet, Command.Action action)
public static void addFieldMultiValue(Packet packet, String f_name, List<String> f_value)
packet
- is a Packet
instance of the ad-hoc command request to be modified.f_name
- is a String
instance with the field name. In ad-hoc command terms this is a variable
name. This field name (variable name) will be also displayed as the field label.f_value
- is a list with lines of text to be displayed as a multi-line field content.public static void addFieldMultiValue(Packet packet, String f_name, List<String> f_value, String label)
public static void addFieldMultiValue(Packet packet, String f_name, Throwable ex)
public static void addFieldValue(Packet packet, String f_name, String f_value)
packet
- is a Packet
instance of the ad-hoc command request to be modified.f_name
- is a String
instance with the field name. In ad-hoc command terms this is a variable
name. This field name (variable name) will be also displayed as the field label.f_value
- is a String
instance with the field default value.public static void addFieldValue(Packet packet, String f_name, String f_value, String label, String[] labels, String[] options)
packet
- is a Packet
instance of the ad-hoc command request to be modified.f_name
- is a String
instance with the field name. In ad-hoc command terms this is a variable
name.f_value
- is a String
instance with the field default value. It must match one of the options
vaulues provided as a list in 'options' parameter.label
- is a String
instance with the field label. This time a label set here is displayed to
the user instead of the field name (variable name). This is useful if the variable name is not suitable or clear
enough to the end-user.labels
- is an array with options labels which are displayed to the end-user upon presenting the selection
options.options
- is an array with options values to be selected by the end-user. Normally these values are not
displayed to the end-user. Only options labels are.public static void addFieldValue(Packet packet, String f_name, String[] f_values, String label, String[] labels, String[] options)
packet
- is a Packet
instance of the ad-hoc command request to be modified.f_name
- is a String
instance with the field name. In ad-hoc command terms this is a variable
name.f_values
- is an array of default values which are presented to the end user as preselected options. They
must match options vaulues provided as a list in 'options' parameter.label
- is a String
instance with the field label. This time a label set here is displayed to
the user instead of the field name (variable name). This is useful if the variable name is not suitable or clear
enough to the end-user.labels
- is an array with options labels which are displayed to the end-user upon presenting the selection
options.options
- is an array with options values to be selected by the end-user. Normally these values are not
displayed to the end-user. Only options labels are.public static void addFieldValue(Packet packet, String f_name, String f_value, String label, String[] labels, String[] options, String type)
public static void addFieldValue(Packet packet, String f_name, String f_value, String type)
public static void addFieldValue(Packet packet, String f_name, String f_value, String type, String label)
protected static Element createCommandEl(String node, Command.DataType data_type)
public static Element createIqCommand(JID from, JID to, StanzaType type, String id, String node, Command.DataType data_type)
public static Command.Action getAction(Packet packet)
public static void setStatus(Packet packet, Command.Status status)
public Packet getPacket(JID from, JID to, StanzaType type, String id)
from
- to
- type
- id
- public Packet getPacket(JID from, JID to, StanzaType type, String id, Command.DataType data_type)
from
- to
- type
- id
- data_type
- Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.