Adds a state listener to the given domain. 
- Parameters
 - 
  
    | self | The domain to add the listener too. This must not be NULL.  | 
    | listener | The listener to add to the domain. If this has already been added to the domain it will not be added a second time. This must not be NULL. | 
  
   
- Returns
 - boolean TRUE if the listener was added. 
 
- Exceptions
 - 
  
    | FALSE | is returned if the listener was unable to be added.  |