org.objectweb.dream.message.codec
Class BasicCodecRepositoryImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.message.codec.BasicCodecRepositoryImpl
All Implemented Interfaces:
AttributeController, BasicCodecRepositoryAttributeController, BindingController, CodecRepository, LifeCycleController, Loggable

public class BasicCodecRepositoryImpl
extends AbstractComponent
implements CodecRepository, BasicCodecRepositoryAttributeController

Codec repository implementation using a Propertiesto map codec name with codec ADL. The content of the Properties object is initialized by reading a properties file (see Properties.load(InputStream)). The name of this file is given by the attribute PropertiesRessourceName (see BasicCodecRepositoryAttributeController). This attribute must be set before the component is started.


Field Summary
protected  Properties repository
           
protected  String repositoryRessourceName
           
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.message.codec.CodecRepository
ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
BasicCodecRepositoryImpl()
           
 
Method Summary
 String getCodecADL(String codecName)
          Returns the name of an ADL for the given codec name.
 String getPropertiesRessourceName()
          Returns the name of the properties file.
 String[] listFc()
           
 void setPropertiesRessourceName(String name)
          Set the name of the properties file.
 void startFc()
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
bindFc, getFcState, initComponent, lookupFc, setLogger, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositoryRessourceName

protected String repositoryRessourceName

repository

protected Properties repository
Constructor Detail

BasicCodecRepositoryImpl

public BasicCodecRepositoryImpl()
Method Detail

getCodecADL

public String getCodecADL(String codecName)
Description copied from interface: CodecRepository
Returns the name of an ADL for the given codec name.

Specified by:
getCodecADL in interface CodecRepository
Parameters:
codecName - a codec name
Returns:
the name of an ADL for the given codec name, or null if the codec name is unknown.
See Also:
CodecRepository.getCodecADL(String)

getPropertiesRessourceName

public String getPropertiesRessourceName()
Description copied from interface: BasicCodecRepositoryAttributeController
Returns the name of the properties file.

Specified by:
getPropertiesRessourceName in interface BasicCodecRepositoryAttributeController
Returns:
the name of the properties file.
See Also:
BasicCodecRepositoryAttributeController.getPropertiesRessourceName()

setPropertiesRessourceName

public void setPropertiesRessourceName(String name)
                                throws CodecManagerException
Description copied from interface: BasicCodecRepositoryAttributeController
Set the name of the properties file.

Specified by:
setPropertiesRessourceName in interface BasicCodecRepositoryAttributeController
Parameters:
name - the name of the properties file.
Throws:
CodecManagerException - if the properties file can't be red.
See Also:
BasicCodecRepositoryAttributeController.setPropertiesRessourceName(String)

listFc

public String[] listFc()
Specified by:
listFc in interface BindingController
See Also:
BindingController.listFc()

startFc

public void startFc()
             throws IllegalLifeCycleException
Specified by:
startFc in interface LifeCycleController
Overrides:
startFc in class AbstractComponent
Throws:
IllegalLifeCycleException
See Also:
LifeCycleController.startFc()


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.