|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.LdapMessageCodec
org.apache.directory.shared.ldap.codec.LdapResponseCodec
org.apache.directory.shared.dsmlv2.reponse.ErrorResponse
public class ErrorResponse
Class representing Error Response.
An Error Response has a requestID, a message, and a type which can be :
Nested Class Summary | |
---|---|
static class |
ErrorResponse.ErrorResponseType
This enum represents the different types of error response |
Field Summary |
---|
Fields inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec |
---|
ldapMessageLength |
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
parent |
Constructor Summary | |
---|---|
ErrorResponse()
Creates a new instance of ErrorResponse. |
|
ErrorResponse(int requestID,
ErrorResponse.ErrorResponseType type,
java.lang.String message)
Creates a new instance of ErrorResponse. |
Method Summary | |
---|---|
protected int |
computeLengthProtocolOp()
|
protected void |
encodeProtocolOp(java.nio.ByteBuffer buffer)
|
java.lang.String |
getMessage()
Gets the message |
MessageTypeEnum |
getMessageType()
Get the message type |
java.lang.String |
getMessageTypeName()
Get the message type Name |
int |
getRequestID()
Gets the request ID |
ErrorResponse.ErrorResponseType |
getType()
Gets the type of error response |
java.lang.String |
getTypeDescr(ErrorResponse.ErrorResponseType type)
Returns the String associated to the error response type |
void |
setMessage(java.lang.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 |
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapResponseCodec |
---|
computeLdapResultLength, encode, getLdapResponseLength, getLdapResult, setLdapResult, toString |
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec |
---|
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toString |
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ErrorResponse()
public ErrorResponse(int requestID, ErrorResponse.ErrorResponseType type, java.lang.String message)
requestID
- the requestID of the responsetype
- the type of the responsemessage
- the associated messageMethod Detail |
---|
public org.dom4j.Element toDsml(org.dom4j.Element root)
DsmlDecorator
toDsml
in interface DsmlDecorator
root
- the root dom4j Element
public java.lang.String getTypeDescr(ErrorResponse.ErrorResponseType type)
type
- the error response type
public java.lang.String getMessage()
public void setMessage(java.lang.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(java.nio.ByteBuffer buffer) throws EncoderException
encodeProtocolOp
in class LdapMessageCodec
EncoderException
public MessageTypeEnum getMessageType()
LdapMessageCodec
getMessageType
in class LdapMessageCodec
public java.lang.String getMessageTypeName()
LdapMessageCodec
getMessageTypeName
in class LdapMessageCodec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |