Package org.apache.qpid.jms.jndi
Class JNDIStorable
- java.lang.Object
-
- org.apache.qpid.jms.jndi.JNDIStorable
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,javax.naming.Referenceable
- Direct Known Subclasses:
JmsConnectionFactory,JmsDestination
public abstract class JNDIStorable extends java.lang.Object implements javax.naming.Referenceable, java.io.ExternalizableFacilitates objects to be stored in JNDI as properties- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JNDIStorable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.Map<java.lang.String,java.lang.String>buildFromProperties(java.util.Map<java.lang.String,java.lang.String> props)Set the properties that will represent the instance in JNDIjava.util.Map<java.lang.String,java.lang.String>getProperties()Get the properties from this instance for storing in JNDIprotected java.lang.StringgetProperty(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String key, java.lang.String defaultValue)javax.naming.ReferencegetReference()Retrieve a Reference for this instance to store in JNDIprotected abstract voidpopulateProperties(java.util.Map<java.lang.String,java.lang.String> props)Initialize the instance from properties stored in JNDIvoidreadExternal(java.io.ObjectInput in)java.util.Map<java.lang.String,java.lang.String>setProperties(java.util.Map<java.lang.String,java.lang.String> props)set the properties for this instance as retrieved from JNDIvoidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
buildFromProperties
protected abstract java.util.Map<java.lang.String,java.lang.String> buildFromProperties(java.util.Map<java.lang.String,java.lang.String> props)
Set the properties that will represent the instance in JNDI- Parameters:
props- The properties to use when building the new isntance.- Returns:
- a new, unmodifiable, map containing any unused properties, or empty if none were.
-
populateProperties
protected abstract void populateProperties(java.util.Map<java.lang.String,java.lang.String> props)
Initialize the instance from properties stored in JNDI- Parameters:
props- The properties to use when initializing the new instance.
-
setProperties
public java.util.Map<java.lang.String,java.lang.String> setProperties(java.util.Map<java.lang.String,java.lang.String> props)
set the properties for this instance as retrieved from JNDI- Parameters:
props- The properties to apply to this instance.- Returns:
- a new, unmodifiable, map containing any unused properties, or empty if none were.
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Get the properties from this instance for storing in JNDI- Returns:
- the properties
-
getReference
public javax.naming.Reference getReference() throws javax.naming.NamingExceptionRetrieve a Reference for this instance to store in JNDI- Specified by:
getReferencein interfacejavax.naming.Referenceable- Returns:
- the built Reference
- Throws:
javax.naming.NamingException- if error on building Reference
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException- See Also:
Externalizable.readExternal(java.io.ObjectInput)
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException- See Also:
Externalizable.writeExternal(java.io.ObjectOutput)
-
getProperty
protected java.lang.String getProperty(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String key, java.lang.String defaultValue)
-
-