cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [1/9] git commit: updated refs/heads/master to b484666
Date Fri, 02 Aug 2013 18:08:40 GMT
Updated Branches:
  refs/heads/master b8c01cfdd -> b484666f1


Changed tabs to space


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dd0536f9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dd0536f9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dd0536f9

Branch: refs/heads/master
Commit: dd0536f9d386cd860638afe814e5306df48ef6fa
Parents: 0b1f97d
Author: Alex Huang <alex.huang@citrix.com>
Authored: Thu Aug 1 09:48:23 2013 -0700
Committer: Alex Huang <alex.huang@citrix.com>
Committed: Fri Aug 2 11:07:54 2013 -0700

----------------------------------------------------------------------
 .../framework/messagebus/MessageDetector.java   | 104 +++++++++----------
 1 file changed, 52 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd0536f9/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java
----------------------------------------------------------------------
diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java
b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java
index 7a7a34a..3fb620c 100644
--- a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java
+++ b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java
@@ -19,57 +19,57 @@
 package org.apache.cloudstack.framework.messagebus;
 
 public class MessageDetector implements MessageSubscriber {
-	
-	private MessageBus _messageBus;
-	private String[] _subjects;
-	
-	private volatile boolean _signalled = false;
-	
-	public MessageDetector() {
-		_messageBus = null;
-		_subjects = null;
-	}
-	
-	public boolean waitAny(long timeoutInMiliseconds) {
-		_signalled = false;
-		synchronized(this) {
-			try {
-				wait(timeoutInMiliseconds);
-			} catch (InterruptedException e) {
-			}
-		}
-		return _signalled;
-	}
-	
-	public void open(MessageBus messageBus, String[] subjects) {
-		assert(messageBus != null);
-		assert(subjects != null);
-		
-		_messageBus = messageBus;
-		_subjects = subjects;
-		
-		if(subjects != null) {
-			for(String subject : subjects) {
-				messageBus.subscribe(subject, this);
-			}
-		}
-	}
-	
-	public void close() {
-		if(_subjects != null) {
-			assert(_messageBus != null);
-			
-			for(String subject : _subjects) {
-				_messageBus.unsubscribe(subject, this);
-			}
-		}
-	}
 
-	@Override
-	public void onPublishMessage(String senderAddress, String subject, Object args) {
-		synchronized(this) {
-			_signalled = true;
-			notifyAll();
-		}
-	}
+    private MessageBus _messageBus;
+    private String[] _subjects;
+
+    private volatile boolean _signalled = false;
+
+    public MessageDetector() {
+        _messageBus = null;
+        _subjects = null;
+    }
+
+    public boolean waitAny(long timeoutInMiliseconds) {
+        _signalled = false;
+        synchronized (this) {
+            try {
+                wait(timeoutInMiliseconds);
+            } catch (InterruptedException e) {
+            }
+        }
+        return _signalled;
+    }
+
+    public void open(MessageBus messageBus, String[] subjects) {
+        assert (messageBus != null);
+        assert (subjects != null);
+
+        _messageBus = messageBus;
+        _subjects = subjects;
+
+        if (subjects != null) {
+            for (String subject : subjects) {
+                messageBus.subscribe(subject, this);
+            }
+        }
+    }
+
+    public void close() {
+        if (_subjects != null) {
+            assert (_messageBus != null);
+
+            for (String subject : _subjects) {
+                _messageBus.unsubscribe(subject, this);
+            }
+        }
+    }
+
+    @Override
+    public void onPublishMessage(String senderAddress, String subject, Object args) {
+        synchronized (this) {
+            _signalled = true;
+            notifyAll();
+        }
+    }
 }


Mime
View raw message