FLAG_ERROR, FLAG_POTENTIALLY_RETRANSMITTED, FLAG_PROXIABLE, FLAG_REQUEST, FLAGS_MASK, HEADER_SIZE, VERSION| Constructor and Description |
|---|
Answer(ByteBuffer bb,
com.bea.wcp.diameter.transport.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.
|
| Modifier and Type | Method and Description |
|---|---|
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()
Performs initial validation of a 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.
|
addAvp, addAvp, addAvp, appendXml, decode, decodeAvps, encode, encode, extractAndSetSessionIdAvp, getAppId, getAppId, getAvp, getAvp, getAvpList, getCode, getCode, getCommand, getConnection, getEffectiveSessionId, getEndToEndId, getHopByHopId, getLength, getOriginHost, getOriginRealm, getSessionId, getVersion, isAnswer, isError, isPotentiallyRetransmitted, isProxiable, isRequest, popProxyInfo, toLoggableString, toString, validate, validateAvppublic Answer(Request req, ResultCode rc)
req - the original Requestrc - the ResultCode for the answerpublic Answer(ByteBuffer bb, com.bea.wcp.diameter.transport.Connection c)
bb - the message bytesc - the connection used to receive the answer messagepublic void preValidate()
throws MessageException
MessagepreValidate in class MessageMessageException - if validation failedprotected void preValidateAvp(Avp avp) throws AvpException
MessagepreValidateAvp in class Messageavp - the AVP to be validatedAvpException - if the AVP was invalidpublic ResultCode getResultCode()
public void setResultCode(ResultCode rc)
rc - the new result codepublic void send()
throws IOException
send in class MessageIOException - if an I/O error occurred while sending the answerIllegalStateException - if this Answer has no associated Requestpublic void commit()
throws IOException
Messagecommit in class MessageIOExceptionpublic boolean isCommitted()
isCommitted in class Messagepublic Request getRequest()
public Session getSession()
MessagegetSession in class Message