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

java.lang.Object
  extended byorg.apache.directory.shared.ldap.message.AbstractMessage
      extended byorg.apache.directory.shared.ldap.message.AbstractRequest
          extended byorg.apache.directory.shared.ldap.message.ExtendedRequestImpl
All Implemented Interfaces:
javax.naming.ldap.ExtendedRequest, ExtendedRequest, Message, Request, ResultResponseRequest, java.io.Serializable, SingleReplyRequest
Direct Known Subclasses:
GracefulShutdownRequest, LaunchDiagnosticUiRequest

public class ExtendedRequestImpl
extends AbstractRequest
implements ExtendedRequest

ExtendedRequest implementation.

Version:
$Rev: 379008 $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
protected  byte[] payload
          Extended request's payload or requestValue
protected  ResultResponse response
           
 
Fields inherited from interface org.apache.directory.shared.ldap.message.ExtendedRequest
RESP_TYPE, TYPE
 
Constructor Summary
ExtendedRequestImpl(int id)
          Creates a Lockable ExtendedRequest implementing object used to perform extended protocol operation on the server.
 
Method Summary
 javax.naming.ldap.ExtendedResponse createExtendedResponse(java.lang.String id, byte[] berValue, int offset, int length)
           
 boolean equals(java.lang.Object obj)
          Checks to see if an object equals this ExtendedRequest.
 byte[] getEncodedValue()
           
 java.lang.String getID()
           
 java.lang.String getOid()
          Gets the Object Idendifier corresponding to the extended request type.
 byte[] getPayload()
          Gets the extended request's requestValue portion of the PDU.
 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.
 void setOid(java.lang.String oid)
          Sets the Object Idendifier corresponding to the extended request type.
 void setPayload(byte[] payload)
          Sets the extended request's requestValue portion of the PDU.
 java.lang.String toString()
          Get a String representation of an Extended Request
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractMessage
add, get, getControls, getMessageId, getType, put, remove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, 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, get, getControls, getMessageId, getType, put, remove
 

Field Detail

payload

protected byte[] payload
Extended request's payload or requestValue


response

protected ResultResponse response
Constructor Detail

ExtendedRequestImpl

public ExtendedRequestImpl(int id)
Creates a Lockable ExtendedRequest implementing object used to perform extended protocol operation on the server.

Parameters:
id - the sequential message identifier
Method Detail

getOid

public java.lang.String getOid()
Gets the Object Idendifier corresponding to the extended request type. This is the requestName portion of the ext. req. PDU.

Specified by:
getOid in interface ExtendedRequest
Returns:
the dotted-decimal representation as a String of the OID

setOid

public void setOid(java.lang.String oid)
Sets the Object Idendifier corresponding to the extended request type.

Specified by:
setOid in interface ExtendedRequest
Parameters:
oid - the dotted-decimal representation as a String of the OID

getPayload

public byte[] getPayload()
Gets the extended request's requestValue portion of the PDU. The form of the data is request specific and is determined by the extended request OID.

Specified by:
getPayload in interface ExtendedRequest
Returns:
byte array of data

setPayload

public void setPayload(byte[] payload)
Sets the extended request's requestValue portion of the PDU.

Specified by:
setPayload in interface ExtendedRequest
Parameters:
payload - byte array of data encapsulating ext. req. parameters

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 equals this ExtendedRequest.

Overrides:
equals in class AbstractMessage
Parameters:
obj - the object to be checked for equality
Returns:
true if the obj equals this ExtendedRequest, false otherwise

toString

public java.lang.String toString()
Get a String representation of an Extended Request

Returns:
an Extended Request String

getID

public java.lang.String getID()
Specified by:
getID in interface javax.naming.ldap.ExtendedRequest

getEncodedValue

public byte[] getEncodedValue()
Specified by:
getEncodedValue in interface javax.naming.ldap.ExtendedRequest

createExtendedResponse

public javax.naming.ldap.ExtendedResponse createExtendedResponse(java.lang.String id,
                                                                 byte[] berValue,
                                                                 int offset,
                                                                 int length)
                                                          throws javax.naming.NamingException
Specified by:
createExtendedResponse in interface javax.naming.ldap.ExtendedRequest
Throws:
javax.naming.NamingException


Copyright © 2003-2006 . All Rights Reserved.