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

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.ExtendedRequestImpl
All Implemented Interfaces:
java.io.Serializable, javax.naming.ldap.ExtendedRequest, InternalExtendedRequest, InternalMessage, InternalRequest, InternalResultResponseRequest, SingleReplyRequest
Direct Known Subclasses:
CancelRequest, CertGenerationRequest, GracefulShutdownRequest, LaunchDiagnosticUiRequest, StoredProcedureRequest

public class ExtendedRequestImpl
extends InternalAbstractRequest
implements InternalExtendedRequest

ExtendedRequest implementation.

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

Field Summary
protected  byte[] payload
          Extended request's payload or requestValue
protected  InternalResultResponse response
           
 
Fields inherited from interface org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest
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.
 InternalResultResponse 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.internal.InternalAbstractRequest
hashCode, 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
 

Field Detail

payload

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


response

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

Overrides:
equals in class InternalAbstractMessage
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

Overrides:
toString in class java.lang.Object
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-2011 Apache Software Foundation. All Rights Reserved.