private void checkFireEventPreconditions ( ActivityHandle handle , FireableEventType eventType , Object event ) throws NullPointerException , IllegalEventException , IllegalStateException { if ( event == null ) throw new NullPointerException ( "event is null" ) ; if ( handle == null ) throw new NullPointerException ( "handle is null" ) ; if ( eventType == null ) { throw new NullPointerException ( "eventType is null" ) ; } final EventTypeComponent eventTypeComponent = componentRepository . getComponentByID ( eventType . getEventType ( ) ) ; if ( eventTypeComponent == null ) { throw new IllegalEventException ( "event type not installed (more on SLEE 1.1 specs 15.14.8)" ) ; } if ( ! eventTypeComponent . getEventTypeClass ( ) . isAssignableFrom ( event . getClass ( ) ) ) { throw new IllegalEventException ( "the class of the event object fired is not assignable to the event class of the event type (more on SLEE 1.1 specs 15.14.8) " ) ; } if ( eventType . getClass ( ) != FireableEventTypeImpl . class ) { throw new IllegalEventException ( "unknown implementation of FireableEventType" ) ; } if ( raEntity . getAllowedEventTypes ( ) != null && ! raEntity . getAllowedEventTypes ( ) . contains ( eventType . getEventType ( ) ) ) { throw new IllegalEventException ( "Resource Adaptor configured to not ignore ra type event checking and the event " + eventType . getEventType ( ) + " does not belongs to any of the ra types implemented by the resource adaptor" ) ; } }
Checks that fire event methods can be invoked