Class EJBIdentifier

  • All Implemented Interfaces:
    Serializable

    public final class EJBIdentifier
    extends Object
    implements Serializable
    An identifier for an Enterprise Bean located within a container. This identifier only names the Enterprise Beans; it does not specify a view, which must be done using the EJBLocator family of types.

    Enterprise Bean identifiers are suitable for use as hash keys.

    Author:
    David M. Lloyd
    See Also:
    Serialized Form
    • Constructor Detail

      • EJBIdentifier

        public EJBIdentifier​(String appName,
                             String moduleName,
                             String beanName,
                             String distinctName)
        Construct a new instance.
        Parameters:
        appName - the application name (must not be null)
        moduleName - the module name (must not be null or empty)
        beanName - the bean name (must not be null or empty)
        distinctName - the distinct name (must not be null)
      • EJBIdentifier

        public EJBIdentifier​(EJBModuleIdentifier moduleIdentifier,
                             String beanName)
        Construct a new instance.
        Parameters:
        moduleIdentifier - the Enterprise Beans module identifier (must not be null)
        beanName - the bean name (must not be null or empty)
    • Method Detail

      • getAppName

        public String getAppName()
        Get the application name, which may be empty.
        Returns:
        the application name (not null)
      • getModuleName

        public String getModuleName()
        Get the module name.
        Returns:
        the module name (not null)
      • getBeanName

        public String getBeanName()
        Get the bean name.
        Returns:
        the bean name (not null)
      • getDistinctName

        public String getDistinctName()
        Get the distinct name.
        Returns:
        the distinct name (not null)
      • getModuleIdentifier

        public EJBModuleIdentifier getModuleIdentifier()
        Get the module identifier.
        Returns:
        the module identifier (not null)
      • equals

        public boolean equals​(Object other)
        Determine if this Enterprise Bean identifier is equal to the given object.
        Overrides:
        equals in class Object
        Parameters:
        other - the object to test
        Returns:
        true if the object is equal to this one, false otherwise
      • equals

        public boolean equals​(EJBIdentifier other)
        Determine if this Enterprise Bean identifier is equal to the given object.
        Parameters:
        other - the object to test
        Returns:
        true if the object is equal to this one, false otherwise
      • hashCode

        public int hashCode()
        Get the hash code of this identifier.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code of this identifier
      • toString

        public String toString()
        Get the Enterprise Beans identifier as a human-readable string.
        Overrides:
        toString in class Object
        Returns:
        the EJB identifier as a human-readable string (not null)