Package org.jboss.ejb.client
Class EJBHomeLocator<T extends javax.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
A locator for an Enterprise Bean's home interface.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct 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
Modifier and TypeMethodDescriptionstatic <T extends javax.ejb.EJBHome>
EJBHomeLocator<T>create(Class<T> viewType, EJBIdentifier identifier, Affinity affinity) Construct a new instance.booleanDetermine 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 javax.ejb.EJBHome>
EJBHomeLocator<? extends S>narrowAsHome(Class<S> type) Narrow this locator to the target type as a home locator.<S> EJBHomeLocator<? extends S>Narrow this locator to the target type.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 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 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
Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean name
-
EJBHomeLocator
Construct a new instance.- Parameters:
viewType- the view typeidentifier- the Enterprise Beans identifieraffinity- the affinity
-
EJBHomeLocator
Construct a new instance.- Parameters:
viewType- the view typeidentifier- the Enterprise Beans identifier
-
EJBHomeLocator
Construct a new instance from an original instance but with a new affinity.- Parameters:
original- the original locatornewAffinity- the new affinity to use
-
-
Method Details
-
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 benull)identifier- the Enterprise Beans identifier (must not benull)affinity- the affinity- Returns:
- the new instance (not
null)
-
withNewAffinity
Description copied from class:EJBLocatorCreate a copy of this locator, but with the new given affinity.- Specified by:
withNewAffinityin classEJBLocator<T extends javax.ejb.EJBHome>- Parameters:
affinity- the new affinity- Returns:
- the new locator
-
narrowTo
Description copied from class:EJBLocatorNarrow this locator to the target type.- Overrides:
narrowToin classEJBLocator<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
Description copied from class:EJBLocatorNarrow this locator to the target type as a home locator.- Overrides:
narrowAsHomein classEJBLocator<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:EJBLocatorDetermine if this is a home locator. If so, calls toEJBLocator.narrowAsHome(Class)will generally succeed.- Overrides:
isHomein classEJBLocator<T extends javax.ejb.EJBHome>- Returns:
trueif this locator is a home,falseotherwise
-
equals
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T extends javax.ejb.EJBHome>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T extends javax.ejb.EJBHome>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this object is equal to another.- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-