activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1356830 - in /activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns: DNSListener.java DNSRecord.java JmDNS.java
Date Tue, 03 Jul 2012 16:55:18 GMT
Author: chirino
Date: Tue Jul  3 16:55:17 2012
New Revision: 1356830

URL: http://svn.apache.org/viewvc?rev=1356830&view=rev
Log:
Open up the visibility of the JmDNS.addListener method.  It's handy for listening for record
updates as they occur

Modified:
    activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java
    activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java
    activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java

Modified: activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java?rev=1356830&r1=1356829&r2=1356830&view=diff
==============================================================================
--- activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java
(original)
+++ activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java
Tue Jul  3 16:55:17 2012
@@ -28,7 +28,7 @@ package org.apache.activemq.jmdns;
  * @author Werner Randelshofer, Rick Blair
  * @version 1.0  May 22, 2004  Created.
  */
-interface DNSListener
+public interface DNSListener
 {
     /**
      * Update a DNS record.

Modified: activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java?rev=1356830&r1=1356829&r2=1356830&view=diff
==============================================================================
--- activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java
(original)
+++ activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java
Tue Jul  3 16:55:17 2012
@@ -34,7 +34,7 @@ import java.util.logging.Logger;
  * @version %I%, %G%
  * @author	Arthur van Hoff, Rick Blair, Werner Randelshofer, Pierre Frisch
  */
-abstract class DNSRecord extends DNSEntry
+public abstract class DNSRecord extends DNSEntry
 {
     private static Logger logger = Logger.getLogger(DNSRecord.class.toString());
     int ttl;
@@ -157,7 +157,7 @@ abstract class DNSRecord extends DNSEntr
     /**
      * Check if the record is expired.
      */
-    boolean isExpired(long now)
+    public boolean isExpired(long now)
     {
         return getExpirationTime(100) <= now;
     }
@@ -189,7 +189,7 @@ abstract class DNSRecord extends DNSEntr
     /**
      * Address record.
      */
-    static class Address extends DNSRecord
+    public static class Address extends DNSRecord
     {
         private static Logger logger = Logger.getLogger(Address.class.toString());
         InetAddress addr;
@@ -408,7 +408,7 @@ abstract class DNSRecord extends DNSEntr
     /**
      * Pointer record.
      */
-    static class Pointer extends DNSRecord
+    public static class Pointer extends DNSRecord
     {
         private static Logger logger = Logger.getLogger(Pointer.class.toString());
         String alias;
@@ -459,10 +459,10 @@ abstract class DNSRecord extends DNSEntr
         }
     }
 
-    static class Text extends DNSRecord
+    public static class Text extends DNSRecord
     {
         private static Logger logger = Logger.getLogger(Text.class.toString());
-        byte text[];
+        final public byte text[];
 
         Text(String name, int type, int clazz, int ttl, byte text[])
         {
@@ -528,7 +528,7 @@ abstract class DNSRecord extends DNSEntr
     /**
      * Service record.
      */
-    static class Service extends DNSRecord
+    public static class Service extends DNSRecord
     {
         private static Logger logger = Logger.getLogger(Service.class.toString());
         int priority;

Modified: activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java?rev=1356830&r1=1356829&r2=1356830&view=diff
==============================================================================
--- activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java (original)
+++ activemq/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java Tue
Jul  3 16:55:17 2012
@@ -737,7 +737,7 @@ public class JmDNS {
      * of answers to the question as they arrive, or from the cache if they
      * are already available.
      */
-    void addListener(DNSListener listener, DNSQuestion question) {
+    public void addListener(DNSListener listener, DNSQuestion question) {
         long now = System.currentTimeMillis();
 
         // add the new listener
@@ -760,7 +760,7 @@ public class JmDNS {
      * Remove a listener from all outstanding questions. The listener will no longer
      * receive any updates.
      */
-    void removeListener(DNSListener listener) {
+    public void removeListener(DNSListener listener) {
         synchronized (this) {
             listeners.remove(listener);
         }



Mime
View raw message