Package org.jboss.ejb.client
Class StatelessEJBLocator<T>
java.lang.Object
org.jboss.ejb.client.EJBLocator<T>
org.jboss.ejb.client.StatelessEJBLocator<T>
- Type Parameters:
T- the remote view type
- All Implemented Interfaces:
Serializable
A locator for a stateless session EJB.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance.StatelessEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName) Construct a new instance.StatelessEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Affinity affinity) Construct a new instance.StatelessEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Affinity affinity) Construct a new instance.StatelessEJBLocator(Class<T> viewType, EJBIdentifier identifier) Construct a new instance.StatelessEJBLocator(Class<T> viewType, EJBIdentifier identifier, Affinity affinity) Construct a new instance.StatelessEJBLocator(StatelessEJBLocator<T> original, Affinity newAffinity) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn this locator as a stateless locator, if it is one.static <T> StatelessEJBLocator<T>create(Class<T> viewType, EJBIdentifier identifier, Affinity affinity) Construct a new instance.static <T> StatelessEJBLocator<T>create(EJBLocator<T> original, Affinity newAffinity) Construct a new instance.booleanDetermine whether this object is equal to another.booleanequals(EJBLocator<?> other) Determine whether this object is equal to another.booleanequals(StatelessEJBLocator<?> other) Determine whether this object is equal to another.booleanDetermine if this is a stateless locator.<S> StatelessEJBLocator<? extends S>narrowAsStateless(Class<S> type) Narrow this locator to the target type as a stateless locator.<S> StatelessEJBLocator<? extends S>Narrow this locator to the target type.withNewAffinity(Affinity affinity) Create a copy of this locator, but with the new given affinity.withSession(SessionID sessionId) Create a copy of this locator, but with the given stateful session ID.withSessionAndAffinity(SessionID sessionId, Affinity affinity) Create a copy of this locator, but with the given affinity and stateful session ID.Methods inherited from class org.jboss.ejb.client.EJBLocator
asStateful, canNarrowTo, createProxyInstance, getAffinity, getAppName, getBeanName, getDistinctName, getIdentifier, getModuleName, getProxyClass, getProxyConstructor, getViewType, hashCode, isEntity, isHome, isStateful, narrowAsEntity, narrowAsHome, narrowAsStateful, toString
-
Constructor Details
-
StatelessEJBLocator
Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean name
-
StatelessEJBLocator
public StatelessEJBLocator(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
-
StatelessEJBLocator
public StatelessEJBLocator(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
-
StatelessEJBLocator
public StatelessEJBLocator(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
-
StatelessEJBLocator
Construct a new instance.- Parameters:
viewType- the view typeidentifier- the EJB identifieraffinity- the affinity
-
StatelessEJBLocator
Construct a new instance.- Parameters:
viewType- the view typeidentifier- the EJB identifier
-
StatelessEJBLocator
Construct a new instance. This constructor creates a copy of the original locator, but with a new affinity.- Parameters:
original- the original locatornewAffinity- the new affinity
-
-
Method Details
-
create
public static <T> StatelessEJBLocator<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 EJB identifier (must not benull)affinity- theAffinityfor this stateful bean locator- Returns:
- the new instance (not
null)
-
create
Construct a new instance. This method uses the location from the original locator, but with the given session ID and affinity.- Type Parameters:
T- the remote view type- Parameters:
original- the original locator (must not benull)newAffinity- the new 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>- Parameters:
affinity- the new affinity- Returns:
- the new locator
-
withSession
Description copied from class:EJBLocatorCreate a copy of this locator, but with the given stateful session ID. If this locator cannot be converted, an exception is thrown.- Overrides:
withSessionin classEJBLocator<T>- Parameters:
sessionId- the stateful session ID (must not benull)- Returns:
- the new locator (not
null)
-
withSessionAndAffinity
Description copied from class:EJBLocatorCreate a copy of this locator, but with the given affinity and stateful session ID. If this locator cannot be converted, an exception is thrown.- Overrides:
withSessionAndAffinityin classEJBLocator<T>- Parameters:
sessionId- the stateful session ID (must not benull)affinity- the new affinity (must not benull)- Returns:
- the new locator (not
null)
-
narrowTo
Description copied from class:EJBLocatorNarrow this locator to the target type.- Overrides:
narrowToin classEJBLocator<T>- Type Parameters:
S- the target type- Parameters:
type- the target type class- Returns:
- this instance, narrowed to the given type
-
narrowAsStateless
Description copied from class:EJBLocatorNarrow this locator to the target type as a stateless locator.- Overrides:
narrowAsStatelessin classEJBLocator<T>- Type Parameters:
S- the target type- Parameters:
type- the target type class- Returns:
- this instance, narrowed to the given type and cast as a stateless locator
-
asStateless
Description copied from class:EJBLocatorReturn this locator as a stateless locator, if it is one.- Overrides:
asStatelessin classEJBLocator<T>- Returns:
- this instance, cast as a stateless locator
-
isStateless
public boolean isStateless()Description copied from class:EJBLocatorDetermine if this is a stateless locator. If so, calls toEJBLocator.asStateless()andEJBLocator.narrowAsStateless(Class)will generally succeed.- Overrides:
isStatelessin classEJBLocator<T>- Returns:
trueif this locator is stateless,falseotherwise
-
equals
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T>- 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
-