|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.fabric.da.GuardResponse
public class GuardResponse
Used by guards to indicate that a particular request should be allowed continue or be prevented from doing so. It is used in two ways. The continue reponse:
...
return GuardResponse.getContinueResponse()
;
And the prevent response:
...
String adminMsg = "Black listed subscription being used.";
String userMsg = "Please check subscription and try again.";
return GuardResponse.newPreventResponse(adminMsg, userMsg)
;
Method Summary | |
---|---|
void |
addErrorCode(java.lang.String errorCode)
Adds an error code to the response to provide yet another reason for this rejection. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAdminMessage()
Exposes the internal reason for rejection. |
static GuardResponse |
getContinueResponse()
Gets the response indicating that the calling guard has no reservations about the request proceeding. |
java.util.Collection |
getErrorCodes()
Retrieves all the error codes for this response. |
java.lang.String |
getUserMessage()
Exposes the public reason for rejection. |
int |
hashCode()
|
static GuardResponse |
newErrorCodePreventResponse(java.lang.String errorCode)
Gets the response indicating that the pending request should be prevented from continuing for a specific reason (or set of reasons). |
static GuardResponse |
newPreventResponse(java.lang.String adminMessage,
java.lang.String userMessage)
Gets the response indicating that the pending request should be prevented from continuing for a specific reason. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static GuardResponse getContinueResponse()
public static GuardResponse newPreventResponse(java.lang.String adminMessage, java.lang.String userMessage)
adminMessage
- non-null text describing the reason for the system administrator. Typically,
this message is externalized, and contains various internal hints.userMessage
- non-null error message that the requestor will be given. This message *should*
be externalized, but not contain too many internal details. It is recommended that this message
indicate whether a repreated request with the same content has any chance of success, or
whether a different context or a policy set is needed for success.
public static GuardResponse newErrorCodePreventResponse(java.lang.String errorCode)
errorCode
- A non-null error code. Note that there may be others added.
public void addErrorCode(java.lang.String errorCode)
errorCode
- The code to be added.public java.util.Collection getErrorCodes()
public java.lang.String getAdminMessage()
public java.lang.String getUserMessage()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |