|
Message Security Layer (MSL) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.netflix.msl.msg.Header
com.netflix.msl.msg.ErrorHeader
public class ErrorHeader
The error data is represented as
errordata = {
"#mandatory" : [ "messageid", "errorcode" ],
"recipient" : "string",
"messageid" : "int64(0,-)",
"errorcode" : "int32(0,-)",
"internalcode" : "int32(0,-)",
"errormsg" : "string",
"usermsg" : "string",
} where:
recipient is the intended recipient's entity identitymessageid is the message IDerrorcode is the error codeinternalcode is an service-specific error codeerrormsg is a developer-consumable error messageusermsg is a user-consumable localized error message
| Field Summary |
|---|
| Fields inherited from class com.netflix.msl.msg.Header |
|---|
KEY_ENTITY_AUTHENTICATION_DATA, KEY_ERRORDATA, KEY_HEADERDATA, KEY_MASTER_TOKEN, KEY_SIGNATURE |
| Constructor Summary | |
|---|---|
|
ErrorHeader(MslContext ctx,
EntityAuthenticationData entityAuthData,
String recipient,
long messageId,
MslConstants.ResponseCode errorCode,
int internalCode,
String errorMsg,
String userMsg)
Construct a new error header with the provided error data. |
protected |
ErrorHeader(MslContext ctx,
String errordata,
EntityAuthenticationData entityAuthData,
byte[] signature)
Construct a new error header from the provided JSON object. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
EntityAuthenticationData |
getEntityAuthenticationData()
Returns the entity authentication data. |
MslConstants.ResponseCode |
getErrorCode()
Returns the error code. |
String |
getErrorMessage()
|
int |
getInternalCode()
|
long |
getMessageId()
|
String |
getRecipient()
|
String |
getUserMessage()
|
int |
hashCode()
|
String |
toJSONString()
|
| Methods inherited from class com.netflix.msl.msg.Header |
|---|
parseHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorHeader(MslContext ctx,
EntityAuthenticationData entityAuthData,
String recipient,
long messageId,
MslConstants.ResponseCode errorCode,
int internalCode,
String errorMsg,
String userMsg)
throws MslEncodingException,
MslCryptoException,
MslEntityAuthException,
MslMessageException
Construct a new error header with the provided error data.
Headers are encrypted and signed using the crypto context appropriate for the entity authentication scheme.
ctx - MSL context.entityAuthData - the entity authentication data.recipient - the intended recipient's entity identity. May be null.messageId - the message ID.errorCode - the error code.internalCode - the internal code. Negative to indicate no code.errorMsg - the error message. May be null.userMsg - the user message. May be null.
MslEncodingException - if there is an error encoding the JSON
data.
MslCryptoException - if there is an error encrypting or signing
the message.
MslEntityAuthException - if there is an error with the entity
authentication data.
MslMessageException - if no entity authentication data is
provided.
protected ErrorHeader(MslContext ctx,
String errordata,
EntityAuthenticationData entityAuthData,
byte[] signature)
throws MslEncodingException,
MslCryptoException,
MslEntityAuthException,
MslMessageException
Construct a new error header from the provided JSON object.
Headers are encrypted and signed using the crypto context appropriate for the entity authentication scheme.
ctx - MSL context.errordata - error data JSON representation.entityAuthData - the entity authentication data.signature - the header signature.
MslEncodingException - if there is an error parsing the JSON.
MslCryptoException - if there is an error decrypting or verifying
the header.
MslEntityAuthException - if the entity authentication data is not
supported or erroneous.
MslMessageException - if there is no entity authentication data
(null), the error data is missing or invalid, the message ID is
negative, or the internal code is negative.| Method Detail |
|---|
public EntityAuthenticationData getEntityAuthenticationData()
public String getRecipient()
public long getMessageId()
public MslConstants.ResponseCode getErrorCode()
ResponseCode#FAIL.
public int getInternalCode()
public String getErrorMessage()
public String getUserMessage()
public String toJSONString()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
Message Security Layer (MSL) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||