Class EJBHomeLocator<T extends jakarta.ejb.EJBHome>

java.lang.Object
org.jboss.ejb.client.EJBLocator<T>
org.jboss.ejb.client.EJBHomeLocator<T>
Type Parameters:
T - the remote view type
All Implemented Interfaces:
Serializable

public final class EJBHomeLocator<T extends jakarta.ejb.EJBHome> extends EJBLocator<T>
A locator for an Enterprise Bean's home interface.
See Also:
  • Constructor Details

    • EJBHomeLocator

      public EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Affinity affinity)
      Construct a new instance.
      Parameters:
      viewType - the view type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      distinctName - the distinct name
      affinity - the affinity
    • EJBHomeLocator

      public EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName)
      Construct a new instance.
      Parameters:
      viewType - the view type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      distinctName - the distinct name
    • EJBHomeLocator

      public EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, Affinity affinity)
      Construct a new instance.
      Parameters:
      viewType - the view type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      affinity - the affinity
    • EJBHomeLocator

      public EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName)
      Construct a new instance.
      Parameters:
      viewType - the view type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
    • EJBHomeLocator

      public EJBHomeLocator(Class<T> viewType, EJBIdentifier identifier, Affinity affinity)
      Construct a new instance.
      Parameters:
      viewType - the view type
      identifier - the Enterprise Beans identifier
      affinity - the affinity
    • EJBHomeLocator

      public EJBHomeLocator(Class<T> viewType, EJBIdentifier identifier)
      Construct a new instance.
      Parameters:
      viewType - the view type
      identifier - the Enterprise Beans identifier
    • EJBHomeLocator

      public EJBHomeLocator(EJBHomeLocator<T> original, Affinity newAffinity)
      Construct a new instance from an original instance but with a new affinity.
      Parameters:
      original - the original locator
      newAffinity - the new affinity to use
  • Method Details

    • create

      public static <T extends jakarta.ejb.EJBHome> EJBHomeLocator<T> create(Class<T> viewType, EJBIdentifier identifier, Affinity affinity)
      Construct a new instance.
      Type Parameters:
      T - the remote view type
      Parameters:
      viewType - the view type (must not be null)
      identifier - the Enterprise Beans identifier (must not be null)
      affinity - the affinity
      Returns:
      the new instance (not null)
    • withNewAffinity

      public EJBHomeLocator<T> withNewAffinity(Affinity affinity)
      Description copied from class: EJBLocator
      Create a copy of this locator, but with the new given affinity.
      Specified by:
      withNewAffinity in class EJBLocator<T extends jakarta.ejb.EJBHome>
      Parameters:
      affinity - the new affinity
      Returns:
      the new locator
    • narrowTo

      public <S> EJBHomeLocator<? extends S> narrowTo(Class<S> type)
      Description copied from class: EJBLocator
      Narrow this locator to the target type.
      Overrides:
      narrowTo in class EJBLocator<T extends jakarta.ejb.EJBHome>
      Type Parameters:
      S - the target type
      Parameters:
      type - the target type class
      Returns:
      this instance, narrowed to the given type
    • narrowAsHome

      public <S extends jakarta.ejb.EJBHome> EJBHomeLocator<? extends S> narrowAsHome(Class<S> type)
      Description copied from class: EJBLocator
      Narrow this locator to the target type as a home locator.
      Overrides:
      narrowAsHome in class EJBLocator<T extends jakarta.ejb.EJBHome>
      Type Parameters:
      S - the target type
      Parameters:
      type - the target type class
      Returns:
      this instance, narrowed to the given type and cast as a home locator
    • isHome

      public boolean isHome()
      Description copied from class: EJBLocator
      Determine if this is a home locator. If so, calls to EJBLocator.narrowAsHome(Class) will generally succeed.
      Overrides:
      isHome in class EJBLocator<T extends jakarta.ejb.EJBHome>
      Returns:
      true if this locator is a home, false otherwise
    • equals

      public boolean equals(Object other)
      Determine whether this object is equal to another.
      Overrides:
      equals in class EJBLocator<T extends jakarta.ejb.EJBHome>
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise
    • equals

      public boolean equals(EJBLocator<?> other)
      Determine whether this object is equal to another.
      Overrides:
      equals in class EJBLocator<T extends jakarta.ejb.EJBHome>
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise
    • equals

      public boolean equals(EJBHomeLocator<?> other)
      Determine whether this object is equal to another.
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise