gozirra-ws/src/main/java/com/hi3project/vineyard/comm/stomp/gozirraws/Stomp.java
public void subscribe( String name,  Listener listener, Map headers ) {
    synchronized (_listeners) {
      if (listener != null) {
        List list = (List)_listeners.get( name );
        if (list == null) {
          list = new ArrayList();
          _listeners.put( name, list );
        }
        if (!list.contains( listener )) list.add( listener );
      }
    }
    if (headers == null) headers = new HashMap();
    headers.put( "destination", name );
    transmit( Command.SUBSCRIBE, headers );
  }
public void subscribe( String name,  Listener listener, Map headers ) {
    synchronized (_listeners) {
      if (listener != null) {
        List list = (List)_listeners.get( name );
        if (list == null) {
          list = new ArrayList();
          _listeners.put( name, list );
        }
        if (!list.contains( listener )) list.add( listener );
      }
    }
    if (headers == null) headers = new HashMap();
    headers.put( "destination", name );
    transmit( Command.SUBSCRIBE, headers );
  }
Subscribe to a channel.

@param name The name of the channel to listen on
@param headers Additional headers to send to the server.
@param listener A listener to receive messages sent to the channel