View Javadoc
1   package org.codehaus.plexus.test;
2   
3   import org.codehaus.plexus.PlexusContainer;
4   import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
5   import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
6   import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException;
7   
8   public class DefaultCircularComponent
9       implements CircularComponent, Startable
10  {
11      private PlexusContainer container;
12      private String lookup;
13      private CircularComponent requirement;
14  
15      public void start()
16          throws StartingException
17      {
18          try
19          {
20              if (lookup != null) {
21                  container.lookup( CircularComponent.class, lookup );
22              }
23          }
24          catch ( Exception e )
25          {
26              throw new StartingException("failed", e);
27          }
28      }
29  
30      public void stop()
31          throws StoppingException
32      {
33      }
34  }