diff --git a/src/org/ice4j/ice/checks/IncomingCheckProcessor.java b/src/org/ice4j/ice/checks/IncomingCheckProcessor.java new file mode 100644 index 0000000..04035b9 --- /dev/null +++ b/src/org/ice4j/ice/checks/IncomingCheckProcessor.java @@ -0,0 +1,44 @@ +/* + * ice4j, the OpenSource Java Solution for NAT and Firewall Traversal. + * Maintained by the SIP Communicator community (http://sip-communicator.org). + * + * Distributable under LGPL license. See terms of license at gnu.org. + */ +package org.ice4j.ice.checks; + +import org.ice4j.*; + +/** + * This interface is used by {@link ConnectivityCheckServer}s to deliver remote + * addresses that they see while handling incoming connectivity checks. + * Implementations of this interface should determine whether these addresses + * were (or will be) advertised by the remote peer and, if not, consider them + * as new, peer reflexive candidates. + *
+ * This is also the interface that allows us to queue triggered checks. + * + * @author Emil Ivov + */ +public interface IncomingCheckProcessor +{ + /** + * Notifies the implementation that the {@link ConnectivityCheckServer} has + * just received a message on localAddress originating at + * remoteAddress carrying the specified priority. This + * will cause us to schedule a triggered check for the corresponding + * remote candidate and potentially to the discovery of a PEER-REFLEXIVE + * candidate. + * + * @param remoteAddress the address that we've just seen, and that is + * potentially a peer-reflexive address. + * @param localAddress the address that we were contacted on. + * @param priority the priority that the remote party assigned to + * @param remoteUFrag the user fragment that we should be using when and if + * we decide to send a check to remoteAddress. + * + */ + public void incomingCheckReceived(TransportAddress remoteAddress, + TransportAddress localAddress, + long priority, + String remoteUFrag); +}