public void unsubscribe ( String name , Map header ) { if ( header == null ) header = new HashMap ( ) ; synchronized ( _listeners ) { _listeners . remove ( name ) ; } header . put ( "destination" , name ) ; transmit ( Command . UNSUBSCRIBE , header ) ; }
Unsubscribe from a channel . Automatically unregisters all listeners of the channel . To re - subscribe with listeners subscribe must be passed the listeners again .