com.lonniepryor.blues.cfg
Class ServiceCfgImpl

java.lang.Object
  |
  +--com.lonniepryor.blues.cfg.AbstractBeanCfg
        |
        +--com.lonniepryor.blues.cfg.ServiceCfgImpl
All Implemented Interfaces:
ServiceCfg, Verifiable

public class ServiceCfgImpl
extends AbstractBeanCfg
implements ServiceCfg, Verifiable

Generic implementation of ServiceCfg.

Version:
$Revision: 1.1 $
Author:
Lonnie Pryor

Nested Class Summary
static class ServiceCfgImpl.IntroduceCfg
          Child element for introducing interfaces.
 
Field Summary
 
Fields inherited from interface com.lonniepryor.blues.cfg.ServiceCfg
validServiceTypes
 
Constructor Summary
ServiceCfgImpl()
          Creates a new ServiceCfgImpl object.
 
Method Summary
 void configure(java.lang.Object serviceInstance, Directory serviceDirectory)
          Configures an instance of the service type.
 void declareIntroduce(ServiceCfgImpl.IntroduceCfg introducton)
          Declares an introduced interface on this service.
 java.lang.Class[] getIntroducedInterfaces()
          Returns all of the interfaces that will be introduced to the service type.
 java.lang.String getName()
          Returns the name of this service.
 java.lang.Class getServiceType()
          Return the type used to implement the service.
 void setClass(java.lang.Class serviceType)
          Sets the type used to implement the service.
 void setName(java.lang.String name)
          Sets the name of this service.
 void verify()
          Verifies the state of this configuration element.
 
Methods inherited from class com.lonniepryor.blues.cfg.AbstractBeanCfg
configureBean, configureBean, declareSetBean, declareSetRefrence, declareSetValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceCfgImpl

public ServiceCfgImpl()
Creates a new ServiceCfgImpl object.

Method Detail

setName

public void setName(java.lang.String name)
Sets the name of this service.

Parameters:
name - The name of this service.

setClass

public void setClass(java.lang.Class serviceType)
Sets the type used to implement the service.

Parameters:
serviceType - The type used to implement the service.

declareIntroduce

public void declareIntroduce(ServiceCfgImpl.IntroduceCfg introducton)
Declares an introduced interface on this service.

Parameters:
introducton - The introducton configuration.

verify

public void verify()
Description copied from interface: Verifiable
Verifies the state of this configuration element.

Specified by:
verify in interface Verifiable

getName

public java.lang.String getName()
Description copied from interface: ServiceCfg
Returns the name of this service.

Specified by:
getName in interface ServiceCfg
Returns:
The name of this service.

getServiceType

public java.lang.Class getServiceType()
Description copied from interface: ServiceCfg
Return the type used to implement the service.

Specified by:
getServiceType in interface ServiceCfg
Returns:
The type used to implement the service.

getIntroducedInterfaces

public java.lang.Class[] getIntroducedInterfaces()
Description copied from interface: ServiceCfg
Returns all of the interfaces that will be introduced to the service type.

Specified by:
getIntroducedInterfaces in interface ServiceCfg
Returns:
All of the interfaces that will be introduced to the service type.

configure

public void configure(java.lang.Object serviceInstance,
                      Directory serviceDirectory)
Description copied from interface: ServiceCfg
Configures an instance of the service type.

Specified by:
configure in interface ServiceCfg
Parameters:
serviceInstance - The instance of the service type to coinfigure.
serviceDirectory - The directory to look up refrenced services in.


Copyright © 2003 Blues Framework. All Rights Reserved.