Package org.apache.activemq.artemis.jndi
Class JNDIStorable
- java.lang.Object
-
- org.apache.activemq.artemis.jndi.JNDIStorable
-
- All Implemented Interfaces:
javax.naming.Referenceable
- Direct Known Subclasses:
ActiveMQConnectionFactory,ActiveMQDestination
public abstract class JNDIStorable extends java.lang.Object implements javax.naming.ReferenceableFacilitates objects to be stored in JNDI as properties
-
-
Constructor Summary
Constructors Constructor Description JNDIStorable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidbuildFromProperties(java.util.Properties props)Set the properties that will represent the instance in JNDIjavax.naming.ReferencegetReference()Retrieve a Reference for this instance to store in JNDIprotected abstract voidpopulateProperties(java.util.Properties props)Initialize the instance from properties stored in JNDIvoidreadObject(java.io.ObjectInput in)Method for class's implementing externalizable to delegate to if not custom implementing.voidwriteObject(java.io.ObjectOutput out)Method for class's implementing externalizable to delegate to if not custom implementing.
-
-
-
Method Detail
-
buildFromProperties
protected abstract void buildFromProperties(java.util.Properties props)
Set the properties that will represent the instance in JNDI- Parameters:
props- The properties to use when building the new isntance.
-
populateProperties
protected abstract void populateProperties(java.util.Properties props)
Initialize the instance from properties stored in JNDI- Parameters:
props- The properties to use when initializing the new instance.
-
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
-
readObject
public void readObject(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionMethod for class's implementing externalizable to delegate to if not custom implementing.- Parameters:
in-- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException- See Also:
Externalizable.readExternal(java.io.ObjectInput)
-
writeObject
public void writeObject(java.io.ObjectOutput out) throws java.io.IOExceptionMethod for class's implementing externalizable to delegate to if not custom implementing.- Parameters:
out-- Throws:
java.io.IOException- See Also:
Externalizable.writeExternal(java.io.ObjectOutput)
-
-