public class ErrorResponse extends AbstractResponse implements Response, DsmlDecorator<Response>
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorResponse.ErrorResponseType
This enum represents the different types of error response
|
controls| Constructor and Description |
|---|
ErrorResponse(int requestID,
ErrorResponse.ErrorResponseType type,
String message)
Creates a new instance of ErrorResponse.
|
ErrorResponse(int id,
MessageTypeEnum type)
Creates a new instance of ErrorResponse.
|
| Modifier and Type | Method and Description |
|---|---|
LdapApiService |
getCodecService() |
Response |
getDecorated()
Gets the Message this DsmlDecorator decorates.
|
ErrorResponse.ErrorResponseType |
getErrorType()
Gets the type of error response
|
String |
getMessage()
Gets the message
|
int |
getRequestID()
Gets the request ID
|
String |
getTypeDescr(ErrorResponse.ErrorResponseType type)
Returns the String associated to the error response type
|
void |
setErrorType(ErrorResponse.ErrorResponseType errorType)
Sets the type of error response
|
void |
setMessage(String message)
Sets the message
|
void |
setRequestID(int requestID)
Sets the request ID
|
org.dom4j.Element |
toDsml(org.dom4j.Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format
|
addAllControls, addControl, equals, get, getControl, getControls, getMessageId, getType, hasControl, hashCode, put, removeControl, setMessageId, toStringclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageIdpublic ErrorResponse(int id,
MessageTypeEnum type)
id - the response eliciting this Requesttype - the message type of the responsepublic 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)
toDsml in interface DsmlDecorator<Response>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 getErrorType()
public void setErrorType(ErrorResponse.ErrorResponseType errorType)
errorType - the type of error response to setpublic LdapApiService getCodecService()
public Response getDecorated()
DsmlDecoratorgetDecorated in interface DsmlDecorator<Response>Copyright © 2021. All rights reserved.