|
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.Request
public class 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(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, 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, String error) Creates a new Answer message for this request. |
Answer |
getAnswer() |
ApplicationId |
getApplicationId() Returns the ApplicationId for this request, or null if none. |
String |
getDestinationHost() Returns the destination host for this request, or null if none. |
Peer[] |
getDestinationPeers() Returns the destination peers for this request. |
String |
getDestinationRealm() Returns the destination realm for this request. |
Node |
getNode() |
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 |
pushProxyInfo() Adds proxy info AVP to the list representing the current node additionally, allocates new hop-by-hop identifier for this request |
void |
send() Sends this Diameter message. |
void |
send(long timeout) Sends the request. |
Answer |
sendAndWait() |
Answer |
sendAndWait(long timeout) |
void |
sendError(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(String host) Sets the destination host for this request. |
void |
setDestinationRealm(String realm) Sets the destination realm for the request. |
static void |
setIsPotentiallyRetransmitted(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, 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 Request(Node node, Command cmd, int appId, String sessionId)
node
- the Diameter Node originating the requestcmd
- the request commandappId
- the message header application identifiersessionId
- the session identifier AVP value, or null if nonepublic Request(Command cmd, Application app)
cmd
- the Command for the requestapp
- the Application for the requestpublic Request(Command cmd, Session session)
session
- the Diameter session for this requestcmd
- the Request command namepublic Request(ByteBuffer bb, Connection c)
bb
- the message bytesc
- the connection used to receive the messageMethod Detail |
---|
public Node getNode()
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 Answer createAnswer(ResultCode rc)
rc
- the ResultCode for the answerpublic Answer createAnswer(ResultCode rc, String error)
rc
- the ResultCode for the answererror
- the error message or null if nonepublic void sendError(Throwable ex) throws IOException
ex
- the exception that caused the errorIOException
- if the answer could not be sentpublic String getDestinationHost()
public String getDestinationRealm()
public ApplicationId getApplicationId()
public void setDestinationHost(String host)
host
- the destination hostIllegalStateException
- if the destination host has already been setpublic void unsetDestinationHost()
public void setDestinationRealm(String realm)
realm
- the destination realmIllegalStateException
- if the destination realm has already been setpublic void setApplicationId(ApplicationId id)
id
- the ApplicationId for the requestIllegalStateException
- if the application id has already been setpublic void setSession(Session session)
public Session getSession()
getSession
in class Message
public void commit() throws IOException
commit
in class Message
IOException
- if an I/O error occurred while sendingpublic boolean isCommitted()
isCommitted
in class Message
public void send(long timeout) throws IOException
IOException
- if an I/O error has occurredpublic void send() throws IOException
Message
send
in class Message
IOException
- if an I/O error occurred while sendingpublic Answer sendAndWait(long timeout) throws IOException
IOException
public Answer sendAndWait() throws IOException
IOException
public boolean isThreadWaiting()
public void setAnswer(Answer ans)
public Answer getAnswer()
public boolean isAnswered()
public void cancel()
public Peer[] getDestinationPeers() throws IOException
IOException
- if no destination peers are availablepublic void pushProxyInfo()
public static void setIsPotentiallyRetransmitted(ByteBuffer bb)
|
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.