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

java.lang.Object
  extended by org.apache.directory.shared.ldap.message.AbstractMessage
      extended by org.apache.directory.shared.ldap.message.AbstractRequest
          extended by org.apache.directory.shared.ldap.message.AbstractAbandonableRequest
              extended by org.apache.directory.shared.ldap.message.AddRequestImpl
All Implemented Interfaces:
AbandonableRequest, AddRequest, Message, Request, ResultResponseRequest, SingleReplyRequest

public class AddRequestImpl
extends AbstractAbandonableRequest
implements AddRequest

Lockable add request implemenation.

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

Field Summary
 
Fields inherited from interface org.apache.directory.shared.ldap.message.AddRequest
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.
 LdapDN 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.
 ResultResponse getResultResponse()
          The result containing response for this request.
 int hashCode()
           
 void setEntry(Entry entry)
          Sets the Entry to add.
 void setEntryDn(LdapDN 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.AbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractMessage
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.Request
hasResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.message.Message
add, addAll, get, getControls, getMessageId, getType, hasControl, put, remove
 
Methods inherited from interface org.apache.directory.shared.ldap.message.AbandonableRequest
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 LdapDN getEntryDn()
Gets the distinguished name of the entry to add.

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

setEntryDn

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

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

getEntry

public Entry getEntry()
Gets the entry to add.

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

setEntry

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

Specified by:
setEntry in interface AddRequest
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 ResultResponse getResultResponse()
The result containing response for this request.

Specified by:
getResultResponse in interface ResultResponseRequest
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 AbstractMessage
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 AbstractRequest
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-2009 Apache Software Foundation. All Rights Reserved.