protected void sendEvent ( final T event ) { if ( isStatic ) { sendEvent ( event , null , null ) ; } else { CreationalContext < X > creationalContext = null ; try { Object receiver = getReceiverIfExists ( null ) ; if ( receiver == null && reception != Reception . IF_EXISTS ) { // creational context is created only if we need it for obtaining receiver // ObserverInvocationStrategy takes care of creating CC for parameters, if needed creationalContext = beanManager . createCreationalContext ( declaringBean ) ; receiver = getReceiverIfExists ( creationalContext ) ; } if ( receiver != null ) { sendEvent ( event , receiver , creationalContext ) ; } } finally { if ( creationalContext != null ) { creationalContext . release ( ) ; } } } }
Invokes the observer method immediately passing the event .