Class JndiName

java.lang.Object
org.jboss.as.naming.deployment.JndiName
All Implemented Interfaces:
Serializable, Comparable<JndiName>

public class JndiName extends Object implements Serializable, Comparable<JndiName>
Utility object used to easily manged the construction and management of JNDI names.
Author:
John E. Bailey
See Also:
  • Method Details

    • getLocalName

      public String getLocalName()
      Get the local JNDI entry name. Eg. java:comp/enc => enc
      Returns:
      The local JNDI entry name
    • getParent

      public JndiName getParent()
      Get the parent JNDI name. Eg. java:comp/enc => java:comp
      Returns:
      The parent JNDI name
    • getAbsoluteName

      public String getAbsoluteName()
      Get the absolute JNDI name as a string.
      Returns:
      The absolute JNDI name as a string
    • append

      public JndiName append(String local)
      Create a new JNDI name by appending a new local entry name to this name.
      Parameters:
      local - The new local part to append
      Returns:
      A new JNDI name
    • of

      public static JndiName of(String name)
      Create a new instance of the JndiName by breaking the provided string format into a JndiName parts.
      Parameters:
      name - The string representation of a JNDI name.
      Returns:
      The JndiName representation
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(JndiName other)
      Specified by:
      compareTo in interface Comparable<JndiName>