@ Override public final void init ( ) throws Exception { FxToolkit . init ( ) ; applicationInit ( ) ; PlatformClient . getClientConfiguration ( ) . setUncaughtExceptionHandler ( ( Thread thread , Throwable exception ) -> { PlatformClient . getClientConfiguration ( ) . getUiExecutor ( ) . execute ( ( ) -> { Assert . requireNonNull ( thread , "thread" ) ; Assert . requireNonNull ( exception , "exception" ) ; if ( connectInProgress . get ( ) ) { runtimeExceptionsAtInitialization . add ( new DolphinRuntimeException ( thread , "Unhandled error in Dolphin Platform background thread" , exception ) ) ; } else { onRuntimeError ( primaryStage , new DolphinRuntimeException ( thread , "Unhandled error in Dolphin Platform background thread" , exception ) ) ; } } ) ; } ) ; try { clientContext = createClientContext ( ) ; Assert . requireNonNull ( clientContext , "clientContext" ) ; connectInProgress . set ( true ) ; clientContext . connect ( ) . get ( 30_000 , TimeUnit . MILLISECONDS ) ; } catch ( ClientInitializationException e ) { initializationException = e ; } catch ( Exception e ) { initializationException = new ClientInitializationException ( "Can not initialize Dolphin Platform Context" , e ) ; } finally { connectInProgress . set ( false ) ; } }
Creates the connection to the Dolphin Platform server . If this method will be overridden always call the super method .