Package org.ldaptive
Class SearchResultReference
java.lang.Object
org.ldaptive.AbstractMessage
org.ldaptive.SearchResultReference
LDAP search result entry defined as:
SearchResultReference ::= [APPLICATION 19] SEQUENCE
SIZE (1..MAX) OF uri URI
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classprotected static classParse handler implementation for the referral URL.Nested classes/interfaces inherited from class org.ldaptive.AbstractMessage
AbstractMessage.AbstractBuilder<B,T extends AbstractMessage>, AbstractMessage.ControlParser, AbstractMessage.ControlsHandler, AbstractMessage.MessageIDHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final inthash code seed.private booleanWhether this object has been marked immutable.static final intBER protocol number.List of references.private static final DERPathDER path to referral URI. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SearchResultReference(DERBuffer buffer) Creates a new search result reference. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new URI to this reference.voidaddUris(Collection<String> uris) Adds a new URI to this reference.voidAsserts that this object is in a state to permit mutations.builder()Creates a builder for this class.static SearchResultReferenceCreates a mutable copy of the supplied search result reference.booleanvoidfreeze()Freezes this object, making it immutable.String[]getUris()Returns the URIs in this reference.inthashCode()Returns the hash code for this object.booleanisFrozen()Determines whether this object is frozen, i.e. immutable.voidremoveUris(String... uri) Removes a URI from this reference.voidremoveUris(Collection<String> uris) Removes a URI from this reference.static SearchResultReferenceReturns a new reference whose URIs are sorted naturally.toString()Methods inherited from class org.ldaptive.AbstractMessage
addControls, copyValues, equalsMessage, getControls, getMessageID, setMessageIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.Message
getControl
-
Field Details
-
PROTOCOL_OP
public static final int PROTOCOL_OPBER protocol number.- See Also:
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
REFERRAL_URI_PATH
DER path to referral URI. -
references
List of references. -
immutable
private volatile boolean immutableWhether this object has been marked immutable.
-
-
Constructor Details
-
SearchResultReference
public SearchResultReference()Default constructor. -
SearchResultReference
Creates a new search result reference.- Parameters:
buffer- to decode
-
-
Method Details
-
freeze
public void freeze()Description copied from interface:FreezableFreezes this object, making it immutable. -
isFrozen
public boolean isFrozen()Description copied from interface:FreezableDetermines whether this object is frozen, i.e. immutable.- Specified by:
isFrozenin interfaceFreezable- Returns:
- True if
Freezable.freeze()has been invoked, false otherwise.
-
assertMutable
public void assertMutable()Description copied from interface:FreezableAsserts that this object is in a state to permit mutations. Classes that implement this interface should invoke this method prior to performing any mutation of internal state as a means of implementing the "frozen" usage contract.- Specified by:
assertMutablein interfaceFreezable
-
getUris
Returns the URIs in this reference.- Returns:
- reference URIs
-
addUris
Adds a new URI to this reference.- Parameters:
uri- to add
-
addUris
Adds a new URI to this reference.- Parameters:
uris- to add
-
removeUris
Removes a URI from this reference.- Parameters:
uri- to remove
-
removeUris
Removes a URI from this reference.- Parameters:
uris- to remove
-
equals
- Overrides:
equalsin classAbstractMessage
-
hashCode
public int hashCode()Description copied from class:AbstractMessageReturns the hash code for this object.- Specified by:
hashCodein classAbstractMessage- Returns:
- hash code
-
toString
- Overrides:
toStringin classAbstractMessage
-
copy
Creates a mutable copy of the supplied search result reference.- Parameters:
ref- to copy- Returns:
- new search result reference instance
-
sort
Returns a new reference whose URIs are sorted naturally.- Parameters:
ref- reference to sort- Returns:
- sorted reference
-
builder
Creates a builder for this class.- Returns:
- new builder
-