public class ErrorResponse extends LdapResponseCodec implements DsmlDecorator
Modifier and Type | Class and Description |
---|---|
static class |
ErrorResponse.ErrorResponseType
This enum represents the different types of error response
|
ldapMessageLength
parent
Constructor and Description |
---|
ErrorResponse()
Creates a new instance of ErrorResponse.
|
ErrorResponse(int requestID,
ErrorResponse.ErrorResponseType type,
String message)
Creates a new instance of ErrorResponse.
|
Modifier and Type | Method and Description |
---|---|
protected int |
computeLengthProtocolOp() |
protected void |
encodeProtocolOp(ByteBuffer buffer) |
String |
getMessage()
Gets the message
|
MessageTypeEnum |
getMessageType()
Get the message type
|
String |
getMessageTypeName()
Get the message type Name
|
int |
getRequestID()
Gets the request ID
|
ErrorResponse.ErrorResponseType |
getType()
Gets the type of error response
|
String |
getTypeDescr(ErrorResponse.ErrorResponseType type)
Returns the String associated to the error response type
|
void |
setMessage(String message)
Sets the message
|
void |
setRequestID(int requestID)
Sets the request ID
|
void |
setType(ErrorResponse.ErrorResponseType type)
Sets the type of error response
|
org.dom4j.Element |
toDsml(org.dom4j.Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format
|
computeLdapResultLength, encode, getLdapResponseLength, getLdapResult, setLdapResult, toString
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toString
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
public ErrorResponse()
public ErrorResponse(int requestID, ErrorResponse.ErrorResponseType type, String message)
requestID
- the requestID of the responsetype
- the type of the responsemessage
- the associated messagepublic org.dom4j.Element toDsml(org.dom4j.Element root)
DsmlDecorator
toDsml
in interface DsmlDecorator
root
- the root dom4j Elementpublic String getTypeDescr(ErrorResponse.ErrorResponseType type)
type
- the error response typepublic String getMessage()
public void setMessage(String message)
message
- the message to setpublic int getRequestID()
public void setRequestID(int requestID)
requestID
- the request ID to setpublic ErrorResponse.ErrorResponseType getType()
public void setType(ErrorResponse.ErrorResponseType type)
type
- the type of error response to setprotected int computeLengthProtocolOp()
computeLengthProtocolOp
in class LdapMessageCodec
protected void encodeProtocolOp(ByteBuffer buffer) throws EncoderException
encodeProtocolOp
in class LdapMessageCodec
EncoderException
public MessageTypeEnum getMessageType()
LdapMessageCodec
getMessageType
in class LdapMessageCodec
public String getMessageTypeName()
LdapMessageCodec
getMessageTypeName
in class LdapMessageCodec
Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.