Package com.lucimber.dbus.message
Enum Class MessageType
- All Implemented Interfaces:
Serializable
,Comparable<MessageType>
,Constable
D-Bus message types as defined in the D-Bus wire protocol.
Each message begins with a single byte indicating its type.
- Since:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionError reply.Method call request.Method return (reply).Signal emission. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageType
fromCode
(byte code) Looks up a MessageType by its byte code.byte
getCode()
Returns the byte code corresponding to this message type.static MessageType
Returns the enum constant of this class with the specified name.static MessageType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
METHOD_CALL
Method call request. Bit mask: 0x01 -
METHOD_RETURN
Method return (reply). Bit mask: 0x02 -
ERROR
Error reply. Bit mask: 0x03 -
SIGNAL
Signal emission. Bit mask: 0x04
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromCode
Looks up a MessageType by its byte code.- Parameters:
code
- the byte code from the wire- Returns:
- the matching MessageType
- Throws:
IllegalArgumentException
- if the code is unrecognized
-
getCode
public byte getCode()Returns the byte code corresponding to this message type.- Returns:
- the D-Bus message type code
-