title: dispatching events with parameters to be catchable in other parts of the app
body: <p>I have a big Java application.</p>
  
  <p>each in-charge of a specific task.</p>
  
  <p>what I'd like to do is to be able to dispatch events with parameters from one class and to be able to catch them in other classes and to execute functions according to them.</p>
  
  <p>for example.</p>
  
  <p>In one of the classes I have a function called <code>userPuchaseGift4Himself</code> so I want to add an event called USER_PURCHASE_GIFT_FOR_HIMSELF that will have 2 parameters, <code>userid</code> and <code>amount</code>. and I want any part of the code to be able to add an event listener to this event and when it connects to this event to execute a code with the relevant parameters the ever dispatched with the event.</p>
  
  <p>can anyone please provide an example on how to do so ? that would be really great.</p>
  
  <p>any information regarding the issue would be greatly appreciated.</p>
  
  <p>thank you so much!</p>