xmlBlaster 2.2.0 contributions API

org.xmlBlaster.contrib
Interface I_Info

All Known Implementing Classes:
ClientPropertiesInfo, DbInfo, DbWatcherPlugin, DbWriterPlugin, FileWatcherPlugin, FileWriter, GlobalInfo, Info, MX4JAdaptor, PropertiesInfo, ReplicationAgent.OwnGlobalInfo, ReplManagerPlugin, SchedulerPlugin, SocketGetterPlugin

public interface I_Info

Hides configuration parameters and passes common objects.

To embed the DbWatcher into your project you need to write a plugin which implements this interface and forwards all calls to you configuration framework.

Author:
Marcel Ruff

Field Summary
static java.lang.String ID
          This is the key used to identify this instance of the info object.
static java.lang.String JMX_PREFIX
           
 
Method Summary
 java.lang.String get(java.lang.String key, java.lang.String def)
          Access a string environment setting.
 boolean getBoolean(java.lang.String key, boolean def)
          Access an environment setting of type boolean.
 int getInt(java.lang.String key, int def)
          Access an environment setting of type int.
 java.util.Set getKeys()
          Gets the keys of the entries stored.
 long getLong(java.lang.String key, long def)
          Access an environment setting of type long.
 java.lang.Object getObject(java.lang.String key)
          Access the remembered object.
 java.util.Set getObjectKeys()
          Gets the keys of the objects registered.
 java.lang.String getRaw(java.lang.String key)
          Returns the value associated to this key.
 void put(java.lang.String key, java.lang.String value)
          Put key/value to environment.
 java.lang.Object putObject(java.lang.String key, java.lang.Object o)
          Store an object.
 void putRaw(java.lang.String key, java.lang.String value)
          Put key/value to environment.
 

Field Detail

JMX_PREFIX

static final java.lang.String JMX_PREFIX
See Also:
Constant Field Values

ID

static final java.lang.String ID
This is the key used to identify this instance of the info object. It can be set explicitly or it can be set by the application. For example Implementations such as the GlobalInfo set it per default to be the id of the Plugin (which is the one returned by the PluginInfo.getType()

See Also:
Constant Field Values
Method Detail

getRaw

java.lang.String getRaw(java.lang.String key)
Returns the value associated to this key.

Parameters:
key -
Returns:

get

java.lang.String get(java.lang.String key,
                     java.lang.String def)
Access a string environment setting.

Parameters:
key - The parameter key
def - The default used if key is not found
Returns:
The configured value of the parameter

putRaw

void putRaw(java.lang.String key,
            java.lang.String value)
Put key/value to environment. This put does not modify (replace) the key, nor the value.

Parameters:
key - The parameter key
value - The parameter value, if null the parameter is removed.
Throws:
java.lang.NullPointerException - if key is null.

put

void put(java.lang.String key,
         java.lang.String value)
Put key/value to environment.

Parameters:
key - The parameter key
value - The parameter value, if null the parameter is removed.
Throws:
java.lang.NullPointerException - if key is null.

getLong

long getLong(java.lang.String key,
             long def)
Access an environment setting of type long.

Parameters:
key - The parameter key
def - The default used if key is not found
Returns:
The configured value of the parameter

getInt

int getInt(java.lang.String key,
           int def)
Access an environment setting of type int.

Parameters:
key - The parameter key
def - The default used if key is not found
Returns:
The configured value of the parameter

getBoolean

boolean getBoolean(java.lang.String key,
                   boolean def)
Access an environment setting of type boolean.

Parameters:
key - The parameter key
def - The default used if key is not found
Returns:
The configured value of the parameter

putObject

java.lang.Object putObject(java.lang.String key,
                           java.lang.Object o)
Store an object.

Parameters:
key - The object key
o - The object to remember or null to remove it
Returns:
The old object or null

getObject

java.lang.Object getObject(java.lang.String key)
Access the remembered object.

Parameters:
key - The object key
Returns:
The found object or null

getKeys

java.util.Set getKeys()
Gets the keys of the entries stored. Note that this does not return the key of the entries stored as objects. To retrieve these use getObjectKeys().

Returns:

getObjectKeys

java.util.Set getObjectKeys()
Gets the keys of the objects registered. Note that this does not return the key of the normal entries. To retrieve these use getKeys().

Returns:

xmlBlaster 2.2.0 contributions API

Copyright © 1999-2014 The xmlBlaster.org contributers.