|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.api.core.app.JndiContext
public final class JndiContext
Defines constants for this library.
Field Summary | |
---|---|
static String |
JNDI_CONTEXT_PATH_BOOT The path within the JNDI context to access boot configuration properties. |
Method Summary | |
---|---|
static JndiContext |
boot(Context context) Provides access to the boot properties within a JNDI context. |
static JndiContext |
config(Context context, String configKey) Provides access to the custom properties within a JNDI context. |
String |
getSourceId() Returns the name of the JNDI namespace. |
NamingEnumeration<NameClassPair> |
list() Returns the list of stored values in the context. |
String |
lookup(String key) Runs a lookup for the value with the given key in the JNDI context and returns the value as a String . |
Boolean |
lookupBoolean(String key) Runs a lookup for the value with the given key in the JNDI context. |
Object |
lookupObject(String key) Runs a lookup for the value with the given key in the JNDI context. |
void |
set(String key, Object value) Sets the value for the given key . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JNDI_CONTEXT_PATH_BOOT
"/smartics-properties/boot"
Method Detail |
---|
public static JndiContext boot(Context context) throws IllegalArgumentException
context
- the root context.
IllegalArgumentException
- if the JNDI context cannot be initialized.
public static JndiContext config(Context context, String configKey) throws IllegalArgumentException
context
- the custom context.
configKey
- the key to the configuration. Will be used as a path within the context to set the root of the configuration.
IllegalArgumentException
- if the JNDI context cannot be initialized.
public Object lookupObject(String key) throws NamingException
key
in the JNDI context.
key
- the key to the value.
NamingException
- on any problem accessing the value.
public String lookup(String key) throws NamingException
key
in the JNDI context and returns the value as a
String
.
key
- the key to the value.
NamingException
- on any problem accessing the value.
public Boolean lookupBoolean(String key) throws NamingException
key
in the JNDI context.
key
- the key to the value.
NamingException
- on any problem accessing the value.
public void set(String key, Object value) throws NamingException
key
.
key
- the key to the value.
value
- the value to the key in the context.
NamingException
- on any problem accessing the value.
public NamingEnumeration<NameClassPair> list() throws NamingException
NamingException
- on any problem accessing the naming context.
public String getSourceId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |