public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).start(); } catch ( StartingException e ) { throw new PhaseExecutionException( "Error starting component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Initializable ) { try { ( (Initializable) object ).initialize(); } catch ( InitializationException e ) { throw new PhaseExecutionException( "Error initialising component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).stop(); } catch ( StoppingException e ) { throw new PhaseExecutionException( "Error stopping component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Configurable ) { try { ( (Configurable) object ).configure( manager.getComponentDescriptor().getConfiguration() ); } catch ( PlexusConfigurationException e ) { throw new PhaseExecutionException( "Error occurred during phase execution", e ); } } } }
throw new PhaseExecutionException( "Unable to auto-configure component as its configurator could not be found", e ); throw new PhaseExecutionException( "Unable to auto-configure component", e );
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Contextualizable ) { Context context = manager.getContainer().getContext(); ClassRealm origRealm = manager.getContainer().setLookupRealm( lookupRealm ); try { ( (Contextualizable) object ).contextualize( context ); } catch ( ContextException e ) { throw new PhaseExecutionException( "Unable to contextualize component", e ); } finally { manager.getContainer().setLookupRealm( origRealm ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Initializable ) { try { ( (Initializable) object ).initialize(); } catch ( InitializationException e ) { throw new PhaseExecutionException( "Error initialising component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).stop(); } catch ( StoppingException e ) { throw new PhaseExecutionException( "Error stopping component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).start(); } catch ( StartingException e ) { throw new PhaseExecutionException( "Error starting component", e ); } } } }
/** * {@inheritDoc} * * @see org.codehaus.plexus.lifecycle.phase.AbstractPhase#execute(java.lang.Object, * org.codehaus.plexus.component.manager.ComponentManager, org.codehaus.plexus.classworlds.realm.ClassRealm) */ @Override public void execute(Object object, ComponentManager componentManager, ClassRealm classRealm) throws PhaseExecutionException { if (object instanceof Initializable) { try { ((Initializable) object).initialize(); } catch (InitializationException e) { throw new PhaseExecutionException("Error initializing component", e); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Configurable ) { try { ( (Configurable) object ).configure( manager.getComponentDescriptor().getConfiguration() ); } catch ( PlexusConfigurationException e ) { throw new PhaseExecutionException( "Error occurred during phase execution", e ); } } } }
throw new PhaseExecutionException( "Unable to auto-configure component as its configurator could not be found", e ); throw new PhaseExecutionException( "Unable to auto-configure component", e ); throw new PhaseExecutionException( "Unable to auto-configure component", e );
throw new PhaseExecutionException( "Unable to auto-configure component as its configurator could not be found", e ); throw new PhaseExecutionException( "Unable to auto-configure component", e );
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Contextualizable ) { Context context = manager.getContainer().getContext(); ClassRealm origRealm = manager.getContainer().setLookupRealm( lookupRealm ); try { ( (Contextualizable) object ).contextualize( context ); } catch ( ContextException e ) { throw new PhaseExecutionException( "Unable to contextualize component", e ); } finally { manager.getContainer().setLookupRealm( origRealm ); } } } }