|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.contrib.ClientPropertiesInfo
public class ClientPropertiesInfo
ClientPropertiesInfo This is the I_Info implementation making use of Properties. Creates a simple implementation based on our ClientProperty maps. This implementation uses the reference to the properties passed. If you want a snapshot of these properties, you need to take a clone and pass the clone to the constructor. Therefore this class can be seen as a decorator to the map passed into the constructor. If you change a value with this class it will update the clientPropertyMap. If entries in the map are found which are not of the type ClientProperty, they are ignored. This class is thread safe.
Field Summary | |
---|---|
(package private) java.util.Map |
clientPropertyMap
|
private InfoHelper |
helper
|
(package private) java.util.Map |
objects
|
Fields inherited from interface org.xmlBlaster.contrib.I_Info |
---|
ID, JMX_PREFIX |
Constructor Summary | |
---|---|
ClientPropertiesInfo(java.util.Map clientPropertyMap)
|
|
ClientPropertiesInfo(java.util.Map clientPropertyMap,
I_Info extraInfo)
|
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. |
java.util.Map<java.lang.String,ClientProperty> |
getClientPropertiesClone()
A shallow clone to avoid race conditions. |
protected ClientProperty |
getClientProperty(java.lang.String key)
|
ClientProperty[] |
getClientPropertyArr()
|
java.util.Map |
getClientPropertyMap()
|
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. |
protected java.lang.String |
getPropAsString(java.lang.String key)
|
java.lang.String |
getRaw(java.lang.String key)
Returns the value associated to this key. |
void |
put(java.lang.String key,
ClientProperty value)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.util.Map clientPropertyMap
java.util.Map objects
private InfoHelper helper
Constructor Detail |
---|
public ClientPropertiesInfo(java.util.Map clientPropertyMap)
clientPropertyMap
- Can be nullpublic ClientPropertiesInfo(java.util.Map clientPropertyMap, I_Info extraInfo)
clientPropertyMap
- Can be nullextraInfo
- Can be nullMethod Detail |
---|
public java.lang.String getRaw(java.lang.String key)
I_Info
getRaw
in interface I_Info
txt
-
protected java.lang.String getPropAsString(java.lang.String key)
txt
-
protected ClientProperty getClientProperty(java.lang.String key)
key
-
public java.lang.String get(java.lang.String key, java.lang.String def)
I_Info
get
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.get(java.lang.String, java.lang.String)
public void put(java.lang.String key, java.lang.String value)
I_Info
put
in interface I_Info
key
- The parameter keyvalue
- The parameter value, if null the parameter is removed.I_Info.put(java.lang.String, java.lang.String)
public void putRaw(java.lang.String key, java.lang.String value)
I_Info
putRaw
in interface I_Info
key
- The parameter keyvalue
- The parameter value, if null the parameter is removed.I_Info.put(java.lang.String, java.lang.String)
public void put(java.lang.String key, ClientProperty value)
I_Info.put(java.lang.String, java.lang.String)
public long getLong(java.lang.String key, long def)
I_Info
getLong
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.getLong(java.lang.String, long)
public int getInt(java.lang.String key, int def)
I_Info
getInt
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.getInt(java.lang.String, int)
public boolean getBoolean(java.lang.String key, boolean def)
I_Info
getBoolean
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.getBoolean(java.lang.String, boolean)
public java.lang.Object getObject(java.lang.String key)
I_Info
getObject
in interface I_Info
key
- The object key
I_Info.getObject(java.lang.String)
public java.lang.Object putObject(java.lang.String key, java.lang.Object o)
I_Info
putObject
in interface I_Info
key
- The object keyo
- The object to remember or null to remove it
I_Info.putObject(java.lang.String, Object)
public java.util.Set getKeys()
I_Info
getKeys
in interface I_Info
I_Info.getKeys()
public java.util.Set getObjectKeys()
I_Info
getObjectKeys
in interface I_Info
I_Info.getObjectKeys()
public java.util.Map getClientPropertyMap()
public ClientProperty[] getClientPropertyArr()
public java.util.Map<java.lang.String,ClientProperty> getClientPropertiesClone()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |