private ServerEventHandler createServerEventHandler ( SFSEventType type , Class < ? > clazz ) { try { return ( ServerEventHandler ) ReflectClassUtil . newInstance ( clazz , BaseAppContext . class , context ) ; } catch ( ExtensionException e ) { getLogger ( ) . error ( "Error when create server event handlers" , e ) ; throw new RuntimeException ( "Can not create event handler of class " + clazz , e ) ; } }
Create server event handler by type and handler class