CVS update: JGroups/src/org/jgroups/client StompConnection.java

"Bela Ban" <[email protected]> Tue, 26 Oct 2010 17:11:33 +0000
Newsgroups gmane.comp.java.javagroups.cvs
Message-ID <[email protected]>
  User: belaban 
  Date: 10/10/26 17:11:33

  Modified:    src/org/jgroups/client StompConnection.java
  Log:
  ns
  
  Revision  Changes    Path
  1.4       +10 -1     JGroups/src/org/jgroups/client/StompConnection.java
  
  Index: StompConnection.java
  ===================================================================
  RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/client/StompConnection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StompConnection.java	26 Oct 2010 16:08:42 -0000	1.3
  +++ StompConnection.java	26 Oct 2010 17:11:33 -0000	1.4
  @@ -27,7 +27,7 @@
    * <p/>
    * [1] http://stomp.codehaus.org/Protocol
    * @author Bela Ban
  - * @version $Id: StompConnection.java,v 1.3 2010/10/26 16:08:42 belaban Exp $
  + * @version $Id: StompConnection.java,v 1.4 2010/10/26 17:11:33 belaban Exp $
    */
   @Experimental @Unsupported
   public class StompConnection implements Runnable {
  @@ -46,6 +46,8 @@
   
       protected volatile boolean running=true;
   
  +    protected String session_id;
  +
       protected final Log log=LogFactory.getLog(getClass());
   
   
  @@ -56,6 +58,9 @@
           server_destinations.add(dest);
       }
   
  +    public String getSessionId() {return session_id;}
  +
  +
       public void addListener(Listener listener) {
           if(listener != null)
               listeners.add(listener);
  @@ -201,6 +206,10 @@
                               notifyListeners(frame.getHeaders(), buf, 0, buf != null? buf.length : 0);
                               break;
                           case CONNECTED:
  +                            String sess_id=frame.getHeaders().get("session-id");
  +                            if(sess_id != null) {
  +                                this.session_id=sess_id;
  +                            }
                               break;
                           case ERROR:
                               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