Package org.freedesktop.dbus
Class DBusMatchRule
java.lang.Object
org.freedesktop.dbus.DBusMatchRule
Defined a rule to match a message.
This is mainly used to handle / take actions when signals arrive.
This is mainly used to handle / take actions when signals arrive.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate static final Patternprivate static final List<Function<DBusMatchRule, String>> Equals operations used inmatches(DBusMatchRule, boolean)- do not change order!private final Stringprivate final Stringprivate static final List<Function<DBusSignal, String>> Equals operations used inmatches(DBusSignal, boolean)- do not change order!private static final Map<String, Class<? extends DBusSignal>> private final Stringprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionDBusMatchRule(Class<? extends Object> _c) DBusMatchRule(Class<? extends Object> _c, String _source, String _object) DBusMatchRule(Class<? extends Object> _c, String _source, String _object, String _type, String _member) DBusMatchRule(Class<? extends DBusInterface> _c, String _method) DBusMatchRule(String _type, String _iface, String _member) DBusMatchRule(String _type, String _iface, String _member, String _object) DBusMatchRule(Message _m) -
Method Summary
Modifier and TypeMethodDescription(package private) voidassertDBusInterface(String _str) booleanstatic Class<? extends DBusSignal> getCachedSignalType(String _type) getType()inthashCode()booleanmatches(DBusMatchRule _rule, boolean _strict) Checks if the given rule matches with our rule.booleanmatches(DBusSignal _signal, boolean _strict) Checks if the given signal matches with our rule.toString()
-
Field Details
-
IFACE_PATTERN
-
SIGNALTYPEMAP
-
MATCHRULE_EQUALS_OPERATIONS
Equals operations used inmatches(DBusMatchRule, boolean)- do not change order! -
SIGNAL_EQUALS_OPERATIONS
Equals operations used inmatches(DBusSignal, boolean)- do not change order! -
type
-
iface
-
member
-
object
-
source
-
-
Constructor Details
-
DBusMatchRule
-
DBusMatchRule
-
DBusMatchRule
- Throws:
DBusException
-
DBusMatchRule
-
DBusMatchRule
- Throws:
DBusException
-
DBusMatchRule
DBusMatchRule(Class<? extends Object> _c, String _source, String _object, String _type, String _member) throws DBusException - Throws:
DBusException
-
DBusMatchRule
public DBusMatchRule(Class<? extends Object> _c, String _source, String _object) throws DBusException - Throws:
DBusException
-
DBusMatchRule
- Throws:
DBusException
-
-
Method Details
-
getCachedSignalType
-
assertDBusInterface
- Throws:
DBusException
-
matches
Checks if the given rule matches with our rule.Method supports partial matching by setting strict to false. Partial means that only the parts of this object are compared to the given object which were set (non-null) on ourselves. Fields set on the given object but not on ourselves will be ignored.
- Parameters:
_rule- rule to compare_strict- true to get an exact match, false to allow partial matches- Returns:
- true if matching
-
matches
Checks if the given signal matches with our rule.Method supports partial matching by setting strict to false. Partial means that only the parts of this rule are compared to the given signal which were set (non-null) on ourselves. Fields set on the given signal but not on ourselves will be ignored.
- Parameters:
_signal- signal to compare_strict- true to get an exact match, false to allow partial matches- Returns:
- true if matching
-
toString
-
hashCode
public int hashCode() -
equals
-
getType
-
getInterface
-
getMember
-
getSource
-
getObject
-