|
Oracle Corp. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.wcp.diameter.Message com.bea.wcp.diameter.Answer
Diameter answer message. Answer extends Message with the ability to get and set the ResultCode for the answer.
Field Summary |
Fields inherited from class com.bea.wcp.diameter.Message |
FLAG_ERROR, FLAG_POTENTIALLY_RETRANSMITTED, FLAG_PROXIABLE, FLAG_REQUEST, FLAGS_MASK, HEADER_SIZE, VERSION |
Constructor Summary | |
Answer(java.nio.ByteBuffer bb,
Connection c)
Creates a new Answer that is parsed from the specified message bytes. |
|
Answer(Request req,
ResultCode rc)
Creates a new Answer for the specified Request and ResultCode. |
Method Summary | |
void |
commit()
Commits a message currently being sent. |
Request |
getRequest()
Returns the original Request used to create this Answer, or null if this answer was not originated by this node. |
ResultCode |
getResultCode()
Returns the ResultCode for this answer. |
Session |
getSession()
Returns the Session associated with this message, or null if none. |
boolean |
isCommitted()
|
void |
preValidate()
Perform initial validation of message to include validation of AVPs required to determine if the request/answer should be forwarded. |
protected void |
preValidateAvp(Avp avp)
Fully decodes and validates the specified AVP. |
void |
send()
If this Answer was created for a Request, then sends the answer using the connection from the associated Request. |
void |
setResultCode(ResultCode rc)
Allows relay or proxy applications to modify result code of an answer message being forwarded. |
Methods inherited from class com.bea.wcp.diameter.Message |
addAvp, addAvp, addAvp, decode, decodeAvps, encode, encode, getAppId, getAvp, getAvp, getAvpList, getCode, getCode, getCommand, getConnection, getEffectiveSessionId, getEndToEndId, getHopByHopId, getLength, getOriginHost, getOriginRealm, getSessionId, getVersion, isAnswer, isError, isPotentiallyRetransmitted, isProxiable, isRequest, toLoggableString, toString, validate, validateAvp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Answer(java.nio.ByteBuffer bb, Connection c)
public Answer(Request req, ResultCode rc)
Method Detail |
public void commit() throws java.io.IOException
Message
commit
in class Message
java.io.IOException
public Request getRequest()
public ResultCode getResultCode()
public Session getSession()
Message
getSession
in class Message
public boolean isCommitted()
isCommitted
in class Message
public void preValidate() throws MessageException
Message
preValidate
in class Message
MessageException
- if validation failedprotected void preValidateAvp(Avp avp) throws AvpException
Message
preValidateAvp
in class Message
avp
- the AVP to be validated
AvpException
- if the AVP was invalidpublic void send() throws java.io.IOException
send
in class Message
java.io.IOException
- if an I/O error occurred while sending the answer
java.lang.IllegalStateException
- if this Answer has no associated Requestpublic void setResultCode(ResultCode rc)
rc
- the new result code
|
Documentation is available at http://e-docs.bea.com/wlcp/wlss40/ Copyright 2008 Oracle Corp. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |