jpel.resolver
Class DynamicConfigurationImpl

java.lang.Object
  |
  +--jpel.resolver.ConfigurationImpl
        |
        +--jpel.resolver.StaticConfigurationImpl
              |
              +--jpel.resolver.DynamicConfigurationImpl
All Implemented Interfaces:
Configuration, DynamicConfiguration, StaticConfiguration
Direct Known Subclasses:
DynamicConfigurationClient

public class DynamicConfigurationImpl
extends StaticConfigurationImpl
implements DynamicConfiguration

Implementação referência da DynamicConfiguration.


Constructor Summary
DynamicConfigurationImpl()
           
 
Method Summary
 void bind(java.lang.Object target, java.lang.String method)
          Método sem parâmetros.
 void bind(java.lang.Object target, java.lang.String method, java.lang.Class[] types, java.lang.String[] commands)
          Método com muitos parâmetros.
 void bind(java.lang.Object target, java.lang.String method, java.lang.Class type, java.lang.String command)
          Método com um único parâmetro.
protected  void clear()
           
 void execute()
          Após a realização de todos os binds, este método deve ser invocado para a realização dos ajustes dos objetos.
 jpel.resolver.Binder getBinder()
           
 java.util.List getList()
           
 void load(java.lang.Object obj)
          Carrega uma configuração.
protected  void rebind()
           
 void reload()
          Recarrega todos os recursos usados pela configuração.
 void setBinder(jpel.resolver.Binder binder)
           
 void setList(java.util.List list)
           
 
Methods inherited from class jpel.resolver.StaticConfigurationImpl
getBoolean, getBoolean, getBooleanArray, getBooleanArray, getBooleanObject, getBooleanObject, getBooleanObjectArray, getBooleanObjectArray, getByte, getByte, getByteArray, getByteArray, getByteObject, getByteObject, getByteObjectArray, getByteObjectArray, getChar, getChar, getCharArray, getCharArray, getCharObject, getCharObject, getCharObjectArray, getCharObjectArray, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleObject, getDoubleObject, getDoubleObjectArray, getDoubleObjectArray, getFloat, getFloat, getFloatArray, getFloatArray, getFloatObject, getFloatObject, getFloatObjectArray, getFloatObjectArray, getInt, getInt, getIntArray, getIntArray, getInterpreter, getIntObject, getIntObject, getIntObjectArray, getIntObjectArray, getLong, getLong, getLongArray, getLongArray, getLongObject, getLongObject, getLongObjectArray, getLongObjectArray, getObject, getObject, getObjectArray, getObjectArray, getShort, getShort, getShortArray, getShortArray, getShortObject, getShortObject, getShortObjectArray, getShortObjectArray, getString, getString, getStringArray, getStringArray, setInterpreter
 
Methods inherited from class jpel.resolver.ConfigurationImpl
getEnvironment, getEnvironmentLoader, getExpressionParser, getSource, process, setEnvironment, setEnvironmentLoader, setExpressionParser, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jpel.resolver.StaticConfiguration
getBoolean, getBoolean, getBooleanArray, getBooleanArray, getBooleanObject, getBooleanObject, getBooleanObjectArray, getBooleanObjectArray, getByte, getByte, getByteArray, getByteArray, getByteObject, getByteObject, getByteObjectArray, getByteObjectArray, getChar, getChar, getCharArray, getCharArray, getCharObject, getCharObject, getCharObjectArray, getCharObjectArray, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleObject, getDoubleObject, getDoubleObjectArray, getDoubleObjectArray, getFloat, getFloat, getFloatArray, getFloatArray, getFloatObject, getFloatObject, getFloatObjectArray, getFloatObjectArray, getInt, getInt, getIntArray, getIntArray, getIntObject, getIntObject, getIntObjectArray, getIntObjectArray, getLong, getLong, getLongArray, getLongArray, getLongObject, getLongObject, getLongObjectArray, getLongObjectArray, getObject, getObject, getObjectArray, getObjectArray, getShort, getShort, getShortArray, getShortArray, getShortObject, getShortObject, getShortObjectArray, getShortObjectArray, getString, getString, getStringArray, getStringArray
 
Methods inherited from interface jpel.resolver.Configuration
getSource, process
 

Constructor Detail

DynamicConfigurationImpl

public DynamicConfigurationImpl()
                         throws ConfigurationException
Method Detail

setBinder

public void setBinder(jpel.resolver.Binder binder)

getBinder

public jpel.resolver.Binder getBinder()

setList

public void setList(java.util.List list)

getList

public java.util.List getList()

load

public void load(java.lang.Object obj)
          throws ConfigurationException
Description copied from interface: Configuration
Carrega uma configuração.

Specified by:
load in interface Configuration
Overrides:
load in class ConfigurationImpl
Parameters:
obj - Objeto com os dados, ou meta-dados, para carregar um ambiente.
Throws:
ConfigurationException - Quando há problemas na leitura da configuração.

clear

protected void clear()

reload

public void reload()
            throws ConfigurationException
Description copied from interface: Configuration
Recarrega todos os recursos usados pela configuração.

Specified by:
reload in interface Configuration
Overrides:
reload in class ConfigurationImpl
Throws:
ConfigurationException - Quando não foi possível realizar o reload().

rebind

protected void rebind()
               throws ConfigurationException
ConfigurationException

bind

public void bind(java.lang.Object target,
                 java.lang.String method,
                 java.lang.Class[] types,
                 java.lang.String[] commands)
          throws ConfigurationException
Description copied from interface: DynamicConfiguration
Método com muitos parâmetros.

Associa determinado valor a um objeto utilizando um método. Nos casos de reload dinâmico apenas os valores ajustados desta forma serão beneficiados.

Specified by:
bind in interface DynamicConfiguration
Parameters:
target - Objeto alvo. Ex: Em "Client c = new Client();", a variável c.
method - Método usado para ajustar o valor. Ex: setName
types - Tipos dos argumentos do método. Ex: {String.class,int.class}
commands - Valores dos atributos usados. Ex: {"user.name","user.id"}
Throws:
ConfigurationException - Quando não foi possível realizar a associação.

bind

public void bind(java.lang.Object target,
                 java.lang.String method,
                 java.lang.Class type,
                 java.lang.String command)
          throws ConfigurationException
Description copied from interface: DynamicConfiguration
Método com um único parâmetro.

Associa determinado valor a um objeto utilizando um método. Nos casos de reload dinâmico apenas os valores ajustados desta forma serão beneficiados.

Specified by:
bind in interface DynamicConfiguration
Parameters:
target - Objeto alvo. Ex: Em "Client c = new Client();", a variável c.
method - Método usado para ajustar o valor. Ex: setName
type - Tipos dos argumentos do método. Ex: String.class
command - Valor do atributo usado. Ex: user.name
Throws:
ConfigurationException - Quando não foi possível realizar a associação.

bind

public void bind(java.lang.Object target,
                 java.lang.String method)
          throws ConfigurationException
Description copied from interface: DynamicConfiguration
Método sem parâmetros.

Define um método sem parametros que deve ser executado. Sempre que a configuração dinamic for recarregada. Abreviação para bind(target,method,null,null).

Specified by:
bind in interface DynamicConfiguration
Parameters:
target - Objeto alvo.
method - Método a ser chamado.
Throws:
ConfigurationException - Quando não foi possível realizar a associação.

execute

public void execute()
             throws ConfigurationException
Description copied from interface: DynamicConfiguration
Após a realização de todos os binds, este método deve ser invocado para a realização dos ajustes dos objetos.

Specified by:
execute in interface DynamicConfiguration
Throws:
ConfigurationException - Quando á erros durante a execução dos binds.