|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.netaddr.BlockingRequestSender
class BlockingRequestSender
A utility used to flatten the multithreaded architecture of the Stack and execute the discovery process in a synchronized manner. Roughly what happens here is: ApplicationThread: sendMessage() wait(); StackThread: processMessage/Timeout() { saveMessage(); notify(); }
Organisation:
Louis Pasteur University, Strasbourg, France
Network Research Team (http://www-r2.u-strasbg.fr)
| Field Summary | |
|---|---|
(package private) net.java.stun4j.StunMessageEvent |
responseEvent
|
| Constructor Summary | |
|---|---|
BlockingRequestSender(net.java.stun4j.stack.StunProvider stunProvider,
net.java.stun4j.NetAccessPointDescriptor apDescriptor)
|
|
| Method Summary | |
|---|---|
void |
processResponse(net.java.stun4j.StunMessageEvent evt)
Saves the message event and notifies the discoverer thread so that it may resume. |
void |
processTimeout()
Notifies the discoverer thread when a message has timeouted so that it may resume and consider it as unanswered. |
net.java.stun4j.StunMessageEvent |
sendRequestAndWaitForResponse(net.java.stun4j.message.Request request,
net.java.stun4j.StunAddress serverAddress)
Sends the specified request and blocks until a response has been received or the request transaction has timed out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
net.java.stun4j.StunMessageEvent responseEvent
| Constructor Detail |
|---|
BlockingRequestSender(net.java.stun4j.stack.StunProvider stunProvider,
net.java.stun4j.NetAccessPointDescriptor apDescriptor)
| Method Detail |
|---|
public void processResponse(net.java.stun4j.StunMessageEvent evt)
processResponse in interface net.java.stun4j.ResponseCollectorevt - the newly arrived message event.public void processTimeout()
processTimeout in interface net.java.stun4j.ResponseCollector
public net.java.stun4j.StunMessageEvent sendRequestAndWaitForResponse(net.java.stun4j.message.Request request,
net.java.stun4j.StunAddress serverAddress)
throws net.java.stun4j.StunException,
IOException,
IllegalArgumentException
request - the reuqest to sendserverAddress - the request destination address
net.java.stun4j.StunException - NETWORK_ERROR or other if we fail to send
the message
IOException
IllegalArgumentException
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||