public static void main ( final String [ ] args ) { try { final Configuration config = getClientConfiguration ( args ) ; LOG . log ( Level . INFO , "Configuration:\n--\n{0}--" , Configurations . toString ( config , true ) ) ; final Injector injector = Tang . Factory . getTang ( ) . newInjector ( config ) ; final SuspendClient client = injector . getInstance ( SuspendClient . class ) ; client . submit ( ) ; client . waitForCompletion ( ) ; LOG . info ( "Done!" ) ; } catch ( final BindException | IOException | InjectionException ex ) { LOG . log ( Level . SEVERE , "Cannot launch: configuration error" , ex ) ; } catch ( final Exception ex ) { LOG . log ( Level . SEVERE , "Cleanup error" , ex ) ; } }
Main method that runs the example .