org.codehaus.plexus.application.service
Class DefaultServiceDiscoverer

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.application.service.DefaultServiceDiscoverer
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled, ServiceDiscoverer

public class DefaultServiceDiscoverer
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ServiceDiscoverer, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Since:
Jul 17, 2004
Author:
Dan Diephouse

Field Summary
private  org.codehaus.plexus.DefaultPlexusContainer container
           
private  java.lang.String serviceDirectory
           
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.application.service.ServiceDiscoverer
ROLE
 
Constructor Summary
DefaultServiceDiscoverer()
           
 
Method Summary
private  void addClasses(java.io.File classes)
           
private  void addConfiguration(java.io.File config)
          The first time the configuration runs, we don't care what the user configuration is, so only use the components.xml files.
private  void addJars(java.io.File jarDir)
           
 void contextualize(org.codehaus.plexus.context.Context context)
           
private  void deploy(java.lang.String name, java.io.File jar, java.io.File services, java.io.File configurations)
           
 void deploy(java.lang.String name, java.lang.String location)
           
 void initialize()
           
private  void startComponents(org.codehaus.plexus.configuration.PlexusConfiguration serviceConfig)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceDirectory

private java.lang.String serviceDirectory

container

private org.codehaus.plexus.DefaultPlexusContainer container
Constructor Detail

DefaultServiceDiscoverer

public DefaultServiceDiscoverer()
Method Detail

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException

deploy

public void deploy(java.lang.String name,
                   java.lang.String location)
            throws java.lang.Exception
Specified by:
deploy in interface ServiceDiscoverer
Throws:
java.lang.Exception

deploy

private void deploy(java.lang.String name,
                    java.io.File jar,
                    java.io.File services,
                    java.io.File configurations)
             throws java.lang.Exception
Throws:
java.lang.Exception

addConfiguration

private void addConfiguration(java.io.File config)
                       throws java.lang.Exception
The first time the configuration runs, we don't care what the user configuration is, so only use the components.xml files. However, we still need to load on start components.

Throws:
java.lang.Exception

startComponents

private void startComponents(org.codehaus.plexus.configuration.PlexusConfiguration serviceConfig)
                      throws org.codehaus.plexus.configuration.PlexusConfigurationException,
                             org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.configuration.PlexusConfigurationException
org.codehaus.plexus.component.repository.exception.ComponentLookupException

addJars

private void addJars(java.io.File jarDir)
              throws java.lang.Exception
Throws:
java.lang.Exception

addClasses

private void addClasses(java.io.File classes)
                 throws java.lang.Exception
Throws:
java.lang.Exception