org.apache.activemq.artemis.jndi

## Class JNDIStorable

- java.lang.Object
- - org.apache.activemq.artemis.jndi.JNDIStorable

- All Implemented Interfaces:
    Referenceable
  Direct Known Subclasses:
    ActiveMQConnectionFactory, ActiveMQDestination

      public abstract class JNDIStorable
      extends Object
      implements Referenceable

  Facilitates objects to be stored in JNDI as properties

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JNDIStorable()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `buildFromProperties(Properties props)` Set the properties that will represent the instance in JNDI
    `Reference` | `getReference()` Retrieve a Reference for this instance to store in JNDI
    `protected abstract void` | `populateProperties(Properties props)` Initialize the instance from properties stored in JNDI
    `void` | `readObject(ObjectInput in)` Method for class's implementing externalizable to delegate to if not custom implementing.
    `void` | `writeObject(ObjectOutput out)` Method for class's implementing externalizable to delegate to if not custom implementing.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JNDIStorable

          public JNDIStorable()

  - ### Method Detail

    - #### buildFromProperties

          protected abstract void buildFromProperties(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(Properties props)

      Initialize the instance from properties stored in JNDI
      Parameters:
        `props` - The properties to use when initializing the new instance.

    - #### getReference

          public Reference getReference()
                                 throws NamingException

      Retrieve a Reference for this instance to store in JNDI
      Specified by:
        `getReference` in interface `Referenceable`
      Returns:
        the built Reference
      Throws:
        `NamingException` - if error on building Reference

    - #### readObject

          public void readObject(ObjectInput in)
                          throws IOException,
                                 ClassNotFoundException

      Method for class's implementing externalizable to delegate to if not custom implementing.
      Parameters:
        `in` -
      Throws:
        `IOException`
        `ClassNotFoundException`
      See Also:
        `Externalizable.readExternal(java.io.ObjectInput)`

    - #### writeObject

          public void writeObject(ObjectOutput out)
                           throws IOException

      Method for class's implementing externalizable to delegate to if not custom implementing.
      Parameters:
        `out` -
      Throws:
        `IOException`
      See Also:
        `Externalizable.writeExternal(java.io.ObjectOutput)`

Copyright © 2020 The Apache Software Foundation. All rights reserved.