|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
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
public class 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(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, appendXml, 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, popProxyInfo, 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(Request req, ResultCode rc)
req
- the original Requestrrc
- the ResultCode for the answerpublic Answer(ByteBuffer bb, Connection c)
bb
- the message bytesc
- the connection used to receive the answer messageMethod Detail |
---|
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 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 Message
IOException
- if an I/O error occurred while sending the answerIllegalStateException
- if this Answer has no associated Requestpublic void commit() throws IOException
Message
commit
in class Message
IOException
public boolean isCommitted()
isCommitted
in class Message
public Request getRequest()
public Session getSession()
Message
getSession
in class Message
|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2012 Oracle Corporation. All Rights Reserved.