Skip to content

Commit

Permalink
added endpoint_addr
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Oct 30, 2010
1 parent 0cc4e94 commit 30e2dd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/org/jgroups/Global.java
Expand Up @@ -8,7 +8,7 @@
* Globals used by JGroups packages.
*
* @author Bela Ban Mar 29, 2004
* @version $Id: Global.java,v 1.64 2010/10/27 10:52:06 belaban Exp $
* @version $Id: Global.java,v 1.64.2.1 2010/10/30 11:10:38 belaban Exp $
*/
public class Global {
public static final int BYTE_SIZE = Byte.SIZE / 8; // 1
Expand Down Expand Up @@ -46,6 +46,7 @@ public class Global {
public static final String MPING_IP_TTL="jgroups.mping.ip_ttl";

public static final String STOMP_BIND_ADDR="jgroups.stomp.bind_addr";
public static final String STOMP_ENDPOINT_ADDR="jgroups.stomp.endpoint_addr";

public static final String MAGIC_NUMBER_FILE="jgroups.conf.magic_number_file";
public static final String PROTOCOL_ID_FILE="jgroups.conf.protocol_id_file";
Expand Down
7 changes: 5 additions & 2 deletions src/org/jgroups/protocols/STOMP.java
Expand Up @@ -26,7 +26,7 @@
* todo: add PING to test health of client connections
* <p/>
* @author Bela Ban
* @version $Id: STOMP.java,v 1.22.2.1 2010/10/30 09:38:30 belaban Exp $
* @version $Id: STOMP.java,v 1.22.2.2 2010/10/30 11:10:37 belaban Exp $
* @since 2.11
*/
@MBean(description="Server side STOPM protocol, STOMP clients can connect to it")
Expand All @@ -42,6 +42,9 @@ public class STOMP extends Protocol implements Runnable {
systemProperty={Global.STOMP_BIND_ADDR},writable=false)
protected InetAddress bind_addr=null;

@Property(description="If set, then endpoint will be set to this address",systemProperty=Global.STOMP_ENDPOINT_ADDR)
protected String endpoint_addr;

@Property(description="Port on which the STOMP protocol listens for requests",writable=false)
protected int port=8787;

Expand Down Expand Up @@ -107,7 +110,7 @@ public void start() throws Exception {
acceptor.start();
}

endpoint=getAddress();
endpoint=endpoint_addr != null? endpoint_addr : getAddress();
}


Expand Down

0 comments on commit 30e2dd1

Please sign in to comment.