From 9606ced6ece6971bea24c81d1cb462a9b9e33db3 Mon Sep 17 00:00:00 2001 From: emcho Date: Mon, 15 Feb 2010 16:35:06 +0000 Subject: [PATCH] Rewrites parts that were deleted during my last git repo sync ... Sigh\! --- src/org/ice4j/StunMessageEvent.java | 17 +++++++++++++++-- .../ice/harvest/StunCandidateHarvester.java | 4 +++- src/org/ice4j/stack/TransactionID.java | 4 ++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/org/ice4j/StunMessageEvent.java b/src/org/ice4j/StunMessageEvent.java index 378be8b..24104bf 100644 --- a/src/org/ice4j/StunMessageEvent.java +++ b/src/org/ice4j/StunMessageEvent.java @@ -43,7 +43,7 @@ public class StunMessageEvent * The TransactionID of the transaction that the source message * is related to. */ - private final TransactionID tranID; + private final TransactionID transactionID; /** * Constructs a StunMessageEvent according to the specified message. @@ -58,7 +58,8 @@ public class StunMessageEvent super(sourceAddress); this.message = message; this.remoteAddress = remoteAddress; - this.transactionID = TransactionID.createTransactionID(message.getTransactionID()); + this.transactionID = TransactionID.createTransactionID(message + .getTransactionID()); } /** @@ -88,4 +89,16 @@ public class StunMessageEvent { return remoteAddress; } + + /** + * Returns the id of the transaction associated with the message that + * triggered this event. + * + * @return the id of the transaction associated with the message that + * triggered this event. + */ + public TransactionID getTransactionID() + { + return transactionID; + } } diff --git a/src/org/ice4j/ice/harvest/StunCandidateHarvester.java b/src/org/ice4j/ice/harvest/StunCandidateHarvester.java index b8e2780..94ef50d 100644 --- a/src/org/ice4j/ice/harvest/StunCandidateHarvester.java +++ b/src/org/ice4j/ice/harvest/StunCandidateHarvester.java @@ -155,7 +155,9 @@ public class StunCandidateHarvester { synchronized (resolveMap) { - //TransactionID tranID = response.getMessage().getTransactionID(); + TransactionID tranID = response.getTransactionID(); + + System.out.println("received a message tranid=" + tranID); } } diff --git a/src/org/ice4j/stack/TransactionID.java b/src/org/ice4j/stack/TransactionID.java index 611cd84..94db12e 100644 --- a/src/org/ice4j/stack/TransactionID.java +++ b/src/org/ice4j/stack/TransactionID.java @@ -50,7 +50,7 @@ public class TransactionID * * @return A TransactionID object with a unique transaction id. */ - static TransactionID createTransactionID() + public static TransactionID createTransactionID() { TransactionID tid = new TransactionID(); @@ -77,7 +77,7 @@ public class TransactionID * @param transactionID the id to give to the new TransactionID * @return a new TransactionID object with the specified id value; */ - static TransactionID createTransactionID(byte[] transactionID) + public static TransactionID createTransactionID(byte[] transactionID) { TransactionID tid = new TransactionID();