Package org.jivesoftware.smack
Enum XMPPConnection.FromMode
- java.lang.Object
-
- java.lang.Enum<XMPPConnection.FromMode>
-
- org.jivesoftware.smack.XMPPConnection.FromMode
-
- All Implemented Interfaces:
Serializable
,Comparable<XMPPConnection.FromMode>
- Enclosing interface:
- XMPPConnection
public static enum XMPPConnection.FromMode extends Enum<XMPPConnection.FromMode>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XMPPConnection.FromMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static XMPPConnection.FromMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNCHANGED
public static final XMPPConnection.FromMode UNCHANGED
Leave the 'from' attribute unchanged. This is the behavior of Smack < 4.0
-
OMITTED
public static final XMPPConnection.FromMode OMITTED
Omit the 'from' attribute. According to RFC 6120 8.1.2.1 1. XMPP servers "MUST (...) override the 'from' attribute specified by the client". It is therefore safe to specify FromMode.OMITTED here.
-
USER
public static final XMPPConnection.FromMode USER
Set the from to the clients full JID. This is usually not required.
-
-
Method Detail
-
values
public static XMPPConnection.FromMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (XMPPConnection.FromMode c : XMPPConnection.FromMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static XMPPConnection.FromMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-