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.Referenceable
Facilitates 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 void
buildFromProperties(java.util.Properties props)
Set the properties that will represent the instance in JNDIjavax.naming.Reference
getReference()
Retrieve a Reference for this instance to store in JNDIprotected abstract void
populateProperties(java.util.Properties props)
Initialize the instance from properties stored in JNDIvoid
readObject(java.io.ObjectInput in)
Method for class's implementing externalizable to delegate to if not custom implementing.void
writeObject(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.NamingException
Retrieve a Reference for this instance to store in JNDI- Specified by:
getReference
in 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.ClassNotFoundException
Method for class's implementing externalizable to delegate to if not custom implementing.- Parameters:
in
-- Throws:
java.io.IOException
java.lang.ClassNotFoundException
- See Also:
Externalizable.readExternal(java.io.ObjectInput)
-
writeObject
public void writeObject(java.io.ObjectOutput out) throws java.io.IOException
Method 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)
-
-