|
OSGi™ Service Platform Release 3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An RFC 1960-based Filter.
Filter objects can be created by calling
BundleContext.createFilter(java.lang.String)
with the chosen filter string.
A Filter object can be used numerous times to determine if the match argument matches the filter string that was used to create the Filter object.
Some examples of LDAP filters are:
"(cn=Babs Jensen)" "(!(cn=Tim Howes))" "(&(" + Constants.OBJECTCLASS + "=Person)(|(sn=Jensen)(cn=Babs J*)))" "(o=univ*of*mich*)"
Method Summary | |
boolean |
equals(java.lang.Object obj)
Compares this Filter object to another object. |
int |
hashCode()
Returns the hashCode for this Filter object. |
boolean |
match(java.util.Dictionary dictionary)
Filter using a Dictionary object. |
boolean |
match(ServiceReference reference)
Filter using a service's properties. |
java.lang.String |
toString()
Returns this Filter object's filter string. |
Method Detail |
public boolean match(ServiceReference reference)
The filter is executed using properties of the referenced service.
reference
- The reference to the service whose properties are used in the match.
public boolean match(java.util.Dictionary dictionary)
dictionary
- The Dictionary object whose keys are used in the match.
java.lang.IllegalArgumentException
- If dictionary contains case
variants of the same key name.public java.lang.String toString()
The filter string is normalized by removing whitespace which does not affect the meaning of the filter.
public boolean equals(java.lang.Object obj)
obj
- The object to compare against this Filter object.
public int hashCode()
|
OSGi™ Service Platform Release 3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |