org.apache.directory.shared.ldap.message
Class AddRequestImpl

java.lang.Object
  extended by org.apache.directory.shared.ldap.message.internal.InternalAbstractMessage
      extended by org.apache.directory.shared.ldap.message.internal.InternalAbstractRequest
          extended by org.apache.directory.shared.ldap.message.AbstractAbandonableRequest
              extended by org.apache.directory.shared.ldap.message.AddRequestImpl
All Implemented Interfaces:
InternalAbandonableRequest, InternalAddRequest, InternalMessage, InternalRequest, InternalResultResponseRequest, SingleReplyRequest

public class AddRequestImpl
extends AbstractAbandonableRequest
implements InternalAddRequest

Lockable add request implemenation.

Version:
$Rev: 918756 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.shared.ldap.message.internal.InternalAddRequest
RESP_TYPE, TYPE
 
Constructor Summary
AddRequestImpl(int id)
          Creates an AddRequest implementation to create a new entry.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks to see if an object is equivalent to this AddRequest.
 Entry getEntry()
          Gets the entry to add.
 DN getEntryDn()
          Gets the distinguished name of the entry to add.
 MessageTypeEnum getResponseType()
          Gets the protocol response message type for this request which produces at least one response.
 InternalResultResponse getResultResponse()
          The result containing response for this request.
 int hashCode()
           
 void setEntry(Entry entry)
          Sets the Entry to add.
 void setEntryDn(DN dn)
          Sets the distinguished name of the entry to add.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractAbandonableRequest
abandon, addAbandonListener, isAbandoned
 
Methods inherited from class org.apache.directory.shared.ldap.message.internal.InternalAbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.shared.ldap.message.internal.InternalAbstractMessage
add, addAll, get, getControls, getMessageId, getType, hasControl, put, remove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.message.internal.InternalRequest
hasResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.message.internal.InternalMessage
add, addAll, get, getControls, getMessageId, getType, hasControl, put, remove
 
Methods inherited from interface org.apache.directory.shared.ldap.message.internal.InternalAbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Constructor Detail

AddRequestImpl

public AddRequestImpl(int id)
Creates an AddRequest implementation to create a new entry.

Parameters:
id - the sequence identifier of the AddRequest message.
Method Detail

getEntryDn

public DN getEntryDn()
Gets the distinguished name of the entry to add.

Specified by:
getEntryDn in interface InternalAddRequest
Returns:
the Dn of the added entry.

setEntryDn

public void setEntryDn(DN dn)
Sets the distinguished name of the entry to add.

Specified by:
setEntryDn in interface InternalAddRequest
Parameters:
entry - the Dn of the added entry.

getEntry

public Entry getEntry()
Gets the entry to add.

Specified by:
getEntry in interface InternalAddRequest
Returns:
the added Entry

setEntry

public void setEntry(Entry entry)
Sets the Entry to add.

Specified by:
setEntry in interface InternalAddRequest
Parameters:
entry - the added Entry

getResponseType

public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.

Specified by:
getResponseType in interface SingleReplyRequest
Returns:
the message type of the response.

getResultResponse

public InternalResultResponse getResultResponse()
The result containing response for this request.

Specified by:
getResultResponse in interface InternalResultResponseRequest
Returns:
the result containing response for this request

equals

public boolean equals(java.lang.Object obj)
Checks to see if an object is equivalent to this AddRequest. First there's a quick test to see if the obj is the same object as this one - if so true is returned. Next if the super method fails false is returned. Then the name of the entry is compared - if not the same false is returned. Lastly the attributes of the entry are compared. If they are not the same false is returned otherwise the method exists returning true.

Overrides:
equals in class InternalAbstractMessage
Parameters:
obj - the object to test for equality to this
Returns:
true if the obj is equal to this AddRequest, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class InternalAbstractRequest
Returns:
the instance's hash code
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.