|
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.Request
Diameter request message. Request extends Message with the ability to directly get and set the destination host, destination realm, and ApplicationId for the request.
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 | |
Request(java.nio.ByteBuffer bb,
Connection c)
y Creates a new Request decoded from the specified message bytes. |
|
Request(Command cmd,
Application app)
Creates a new Request for the specified application and command. |
|
Request(Command cmd,
Session session)
Creates a new Request for the specified session and command. |
|
Request(Node node,
Command cmd,
int appId,
java.lang.String sessionId)
Creates a new Request for a given command, application, and optional session identifier. |
Method Summary | |
void |
cancel()
|
void |
commit()
Commits the request and sends it to the destination peer or realm. |
Answer |
createAnswer(ResultCode rc)
Creates an Answer message for this request. |
Answer |
createAnswer(ResultCode rc,
java.lang.String error)
Creates a new Answer message for this request. |
Answer |
getAnswer()
|
ApplicationId |
getApplicationId()
Returns the ApplicationId for this request, or null if none. |
java.lang.String |
getDestinationHost()
Returns the destination host for this request, or null if none. |
com.bea.wcp.diameter.Peer[] |
getDestinationPeers()
Returns the destination peers for this request. |
java.lang.String |
getDestinationRealm()
Returns the destination realm for this request. |
Session |
getSession()
Returns the session associated with this request. |
boolean |
isAnswered()
Returns true if this request has already been answered. |
boolean |
isCommitted()
Returns true if the request has been committed. |
boolean |
isThreadWaiting()
|
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()
Sends this Diameter message. |
void |
send(long timeout)
Sends the request. |
Answer |
sendAndWait()
|
Answer |
sendAndWait(long timeout)
|
void |
sendError(java.lang.Throwable ex)
Sends an error answer for this request and the specified exception. |
void |
setAnswer(Answer ans)
|
void |
setApplicationId(ApplicationId id)
Sets the ApplicationId for the request. |
void |
setDestinationHost(java.lang.String host)
Sets the destination host for this request. |
void |
setDestinationRealm(java.lang.String realm)
Sets the destination realm for the request. |
static void |
setIsPotentiallyRetransmitted(java.nio.ByteBuffer bb)
|
void |
setSession(Session session)
|
void |
unsetDestinationHost()
Unsets the destination host for this request and removes the Destination-Host AVP. |
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 Request(java.nio.ByteBuffer bb, Connection c)
public Request(Command cmd, Application app)
public Request(Command cmd, Session session)
public Request(Node node, Command cmd, int appId, java.lang.String sessionId)
Method Detail |
public void cancel()
public void commit() throws java.io.IOException
commit
in class Message
java.io.IOException
- if an I/O error occurred while sendingpublic Answer createAnswer(ResultCode rc)
rc
- the ResultCode for the answer
public Answer createAnswer(ResultCode rc, java.lang.String error)
rc
- the ResultCode for the answererror
- the error message or null if none
public Answer getAnswer()
public ApplicationId getApplicationId()
public java.lang.String getDestinationHost()
public com.bea.wcp.diameter.Peer[] getDestinationPeers() throws java.io.IOException
java.io.IOException
- if no destination peers are availablepublic java.lang.String getDestinationRealm()
public Session getSession()
getSession
in class Message
public boolean isAnswered()
public boolean isCommitted()
isCommitted
in class Message
public boolean isThreadWaiting()
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
Message
send
in class Message
java.io.IOException
- if an I/O error occurred while sendingpublic void send(long timeout) throws java.io.IOException
java.io.IOException
- if an I/O error has occurredpublic Answer sendAndWait() throws java.io.IOException
java.io.IOException
public Answer sendAndWait(long timeout) throws java.io.IOException
java.io.IOException
public void sendError(java.lang.Throwable ex) throws java.io.IOException
ex
- the exception that caused the error
java.io.IOException
- if the answer could not be sentpublic void setAnswer(Answer ans)
public void setApplicationId(ApplicationId id)
id
- the ApplicationId for the request
java.lang.IllegalStateException
- if the application id has already been setpublic void setDestinationHost(java.lang.String host)
host
- the destination host
java.lang.IllegalStateException
- if the destination host has already been setpublic void setDestinationRealm(java.lang.String realm)
realm
- the destination realm
java.lang.IllegalStateException
- if the destination realm has already been setpublic static void setIsPotentiallyRetransmitted(java.nio.ByteBuffer bb)
public void setSession(Session session)
public void unsetDestinationHost()
|
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 |