CVS update: JGroups/src/org/jgroups/protocols STOMP.java
"Bela Ban" <[email protected]> Sat, 30 Oct 2010 09:38:31 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban
Date: 10/10/30 09:38:30
Modified: src/org/jgroups/protocols Tag: Branch_JGroups_2_11
STOMP.java
Log:
ns
Revision Changes Path
No revision
No revision
1.22.2.1 +8 -4 JGroups/src/org/jgroups/protocols/STOMP.java
Index: STOMP.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/protocols/STOMP.java,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- STOMP.java 27 Oct 2010 14:03:41 -0000 1.22
+++ STOMP.java 30 Oct 2010 09:38:30 -0000 1.22.2.1
@@ -26,7 +26,7 @@
* todo: add PING to test health of client connections
* <p/>
* @author Bela Ban
- * @version $Id: STOMP.java,v 1.22 2010/10/27 14:03:41 belaban Exp $
+ * @version $Id: STOMP.java,v 1.22.2.1 2010/10/30 09:38:30 belaban Exp $
* @since 2.11
*/
@MBean(description="Server side STOPM protocol, STOMP clients can connect to it")
@@ -53,6 +53,8 @@
"a different server should a connection be closed.")
protected boolean send_info=true;
+ @Property(description="Forward received messages which don't have a StompHeader to clients")
+ protected boolean forward_non_client_generated_msgs=false;
/* --------------------------------------------- JMX ---------------------------------------------------*/
@ManagedAttribute(description="Number of client connections",writable=false)
@@ -174,9 +176,11 @@
Message msg=(Message)evt.getArg();
StompHeader hdr=(StompHeader)msg.getHeader(id);
if(hdr == null) {
- HashMap<String, String> hdrs=new HashMap<String, String>();
- hdrs.put("sender", msg.getSrc().toString());
- sendToClients(hdrs, msg.getRawBuffer(), msg.getOffset(), msg.getLength());
+ if(forward_non_client_generated_msgs) {
+ HashMap<String, String> hdrs=new HashMap<String, String>();
+ hdrs.put("sender", msg.getSrc().toString());
+ sendToClients(hdrs, msg.getRawBuffer(), msg.getOffset(), msg.getLength());
+ }
break;
}
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev