-
- All Implemented Interfaces:
-
org.ice4j.ResponseCollector,org.ice4j.stack.MessageEventHandler
public class GoogleRelayedCandidateDelegate implements MessageEventHandler, ResponseCollector
Google TURN delegate object that will handle GTalk TURN send/receive operations.
-
-
Constructor Summary
Constructors Constructor Description GoogleRelayedCandidateDelegate(GoogleTurnCandidateHarvest turnCandidateHarvest, String username)Initializes a new GoogleRelayedCandidateDatagramSocket instance which is to be the socket of a specific RelayedCandidate harvested by a specific TurnCandidateHarvest.
-
Method Summary
Modifier and Type Method Description voidclose()Closes this datagram socket. voidhandleMessageEvent(StunMessageEvent e)Notifies this MessageEventHandler that a specific STUN message has been received, parsed and is ready for delivery. booleanprocessErrorOrFailure(Response response, Request request)Notifies this GoogleRelayedCandidateDatagramSocket that a specific Request it has sent has either failed or received a STUN error Response. voidprocessSuccess(Response response, Request request)Notifies this GoogleRelayedCandidateDatagramSocket that a specific Request it has sent has received a STUN success Response. voidprocessResponse(StunResponseEvent response)Dispatch the specified response. voidprocessTimeout(StunTimeoutEvent event)Notifies this collector that no response had been received after repeated retransmissions of the original request (as described by rfc3489) and that the request should be considered unanswered. voidreceive(DatagramPacket p)Receives a datagram packet from this socket. voidsend(DatagramPacket p)Sends a datagram packet from this socket. -
-
Constructor Detail
-
GoogleRelayedCandidateDelegate
GoogleRelayedCandidateDelegate(GoogleTurnCandidateHarvest turnCandidateHarvest, String username)
Initializes a new GoogleRelayedCandidateDatagramSocket instance which is to be the socket of a specific RelayedCandidate harvested by a specific TurnCandidateHarvest.- Parameters:
turnCandidateHarvest- the TurnCandidateHarvest which has harvested relayedCandidateusername- username
-
-
Method Detail
-
close
void close()
Closes this datagram socket.
-
handleMessageEvent
void handleMessageEvent(StunMessageEvent e)
Notifies this MessageEventHandler that a specific STUN message has been received, parsed and is ready for delivery. GoogleRelayedCandidateDatagramSocket handles STUN indications sent from the associated TURN server and received at the associated local TransportAddress.
- Parameters:
e- a StunMessageEvent which encapsulates the received STUN message
-
processErrorOrFailure
boolean processErrorOrFailure(Response response, Request request)
Notifies this GoogleRelayedCandidateDatagramSocket that a specific Request it has sent has either failed or received a STUN error Response.
- Parameters:
response- the Response which responds to requestrequest- the Request sent by this instance to which response responds
-
processSuccess
void processSuccess(Response response, Request request)
Notifies this GoogleRelayedCandidateDatagramSocket that a specific Request it has sent has received a STUN success Response.
- Parameters:
response- the Response which responds to requestrequest- the Request sent by this instance to which response responds
-
processResponse
void processResponse(StunResponseEvent response)
Dispatch the specified response.
- Parameters:
response- the response to dispatch.
-
processTimeout
void processTimeout(StunTimeoutEvent event)
Notifies this collector that no response had been received after repeated retransmissions of the original request (as described by rfc3489) and that the request should be considered unanswered.
- Parameters:
event- the StunTimeoutEvent containing a reference to the transaction that has just failed.
-
receive
void receive(DatagramPacket p)
Receives a datagram packet from this socket. When this method returns, the DatagramPacket's buffer is filled with the data received. The datagram packet also contains the sender's IP address, and the port number on the sender's machine.
- Parameters:
p- the DatagramPacket into which to place the incoming data
-
send
void send(DatagramPacket p)
Sends a datagram packet from this socket. The DatagramPacket includes information indicating the data to be sent, its length, the IP address of the remote host, and the port number on the remote host.
- Parameters:
p- the DatagramPacket to be sent
-
-
-
-