Class EJBHomeLocator<T extends javax.ejb.EJBHome>

  • Type Parameters:
    T - the remote view type
    All Implemented Interfaces:
    Serializable

    public final class EJBHomeLocator<T extends javax.ejb.EJBHome>
    extends EJBLocator<T>
    A locator for an EJB's home interface.
    See Also:
    Serialized Form
    • Constructor Detail

      • 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 EJB identifier
        affinity - the affinity
      • EJBHomeLocator

        public EJBHomeLocator​(Class<T> viewType,
                              EJBIdentifier identifier)
        Construct a new instance.
        Parameters:
        viewType - the view type
        identifier - the EJB 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 Detail

      • create

        public static <T extends javax.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 EJB 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 javax.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 javax.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 javax.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 javax.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 javax.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 javax.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 javax.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