Package org.jboss.ejb.client
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName)Construct a new instance.EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName)Construct a new instance.EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Affinity affinity)Construct a new instance.EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, Affinity affinity)Construct a new instance.EJBHomeLocator(Class<T> viewType, EJBIdentifier identifier)Construct a new instance.EJBHomeLocator(Class<T> viewType, EJBIdentifier identifier, Affinity affinity)Construct a new instance.EJBHomeLocator(EJBHomeLocator<T> original, Affinity newAffinity)Construct a new instance from an original instance but with a new affinity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends jakarta.ejb.EJBHome>
EJBHomeLocator<T>create(Class<T> viewType, EJBIdentifier identifier, Affinity affinity)Construct a new instance.booleanequals(Object other)Determine whether this object is equal to another.booleanequals(EJBHomeLocator<?> other)Determine whether this object is equal to another.booleanequals(EJBLocator<?> other)Determine whether this object is equal to another.booleanisHome()Determine if this is a home locator.<S extends jakarta.ejb.EJBHome>
EJBHomeLocator<? extends S>narrowAsHome(Class<S> type)Narrow this locator to the target type as a home locator.<S> EJBHomeLocator<? extends S>narrowTo(Class<S> type)Narrow this locator to the target type.EJBHomeLocator<T>withNewAffinity(Affinity affinity)Create a copy of this locator, but with the new given affinity.-
Methods inherited from class org.jboss.ejb.client.EJBLocator
asStateful, asStateless, canNarrowTo, createProxyInstance, getAffinity, getAppName, getBeanName, getDistinctName, getIdentifier, getModuleName, getProxyClass, getProxyConstructor, getViewType, hashCode, isEntity, isStateful, isStateless, narrowAsEntity, narrowAsStateful, narrowAsStateless, toString, withSession, withSessionAndAffinity
-
-
-
-
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 typeappName- the application namemoduleName- the module namebeanName- the bean namedistinctName- the distinct nameaffinity- the affinity
-
EJBHomeLocator
public EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName)
Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean namedistinctName- 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 typeappName- the application namemoduleName- the module namebeanName- the bean nameaffinity- the affinity
-
EJBHomeLocator
public EJBHomeLocator(Class<T> viewType, String appName, String moduleName, String beanName)
Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean name
-
EJBHomeLocator
public EJBHomeLocator(Class<T> viewType, EJBIdentifier identifier, Affinity affinity)
Construct a new instance.- Parameters:
viewType- the view typeidentifier- the Enterprise Beans identifieraffinity- the affinity
-
EJBHomeLocator
public EJBHomeLocator(Class<T> viewType, EJBIdentifier identifier)
Construct a new instance.- Parameters:
viewType- the view typeidentifier- 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 locatornewAffinity- the new affinity to use
-
-
Method Detail
-
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 benull)identifier- the Enterprise Beans identifier (must not benull)affinity- the affinity- Returns:
- the new instance (not
null)
-
withNewAffinity
public EJBHomeLocator<T> withNewAffinity(Affinity affinity)
Description copied from class:EJBLocatorCreate a copy of this locator, but with the new given affinity.- Specified by:
withNewAffinityin classEJBLocator<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:EJBLocatorNarrow this locator to the target type.- Overrides:
narrowToin classEJBLocator<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:EJBLocatorNarrow this locator to the target type as a home locator.- Overrides:
narrowAsHomein classEJBLocator<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:EJBLocatorDetermine if this is a home locator. If so, calls toEJBLocator.narrowAsHome(Class)will generally succeed.- Overrides:
isHomein classEJBLocator<T extends jakarta.ejb.EJBHome>- Returns:
trueif this locator is a home,falseotherwise
-
equals
public boolean equals(Object other)
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T extends jakarta.ejb.EJBHome>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
public boolean equals(EJBLocator<?> other)
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T extends jakarta.ejb.EJBHome>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
public boolean equals(EJBHomeLocator<?> other)
Determine whether this object is equal to another.- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
-