T
- the remote view typepublic final class StatefulEJBLocator<T> extends EJBLocator<T>
Constructor and Description |
---|
StatefulEJBLocator(Class<T> viewType,
EJBIdentifier identifier,
SessionID sessionId)
Construct a new instance.
|
StatefulEJBLocator(Class<T> viewType,
EJBIdentifier identifier,
SessionID sessionId,
Affinity affinity)
Construct a new instance.
|
StatefulEJBLocator(Class<T> viewType,
String appName,
String moduleName,
String beanName,
SessionID sessionId)
Construct a new instance.
|
StatefulEJBLocator(Class<T> viewType,
String appName,
String moduleName,
String beanName,
SessionID sessionId,
Affinity affinity)
Construct a new instance.
|
StatefulEJBLocator(Class<T> viewType,
String appName,
String moduleName,
String beanName,
String distinctName,
SessionID sessionId)
Construct a new instance.
|
StatefulEJBLocator(Class<T> viewType,
String appName,
String moduleName,
String beanName,
String distinctName,
SessionID sessionId,
Affinity affinity)
Construct a new instance.
|
StatefulEJBLocator(EJBLocator<T> original,
SessionID sessionId)
Construct a new instance.
|
StatefulEJBLocator(EJBLocator<T> original,
SessionID sessionId,
Affinity newAffinity)
Construct a new instance.
|
StatefulEJBLocator(StatefulEJBLocator<T> original,
Affinity newAffinity)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
StatefulEJBLocator<T> |
asStateful()
Return this locator as a stateful locator, if it is one.
|
static <T> StatefulEJBLocator<T> |
create(Class<T> viewType,
EJBIdentifier identifier,
SessionID sessionId,
Affinity affinity)
Construct a new instance.
|
boolean |
equals(EJBLocator<?> other)
Determine whether this object is equal to another.
|
boolean |
equals(Object other)
Determine whether this object is equal to another.
|
boolean |
equals(StatefulEJBLocator<?> other)
Determine whether this object is equal to another.
|
SessionID |
getSessionId()
Get the session ID associated with this locator.
|
boolean |
isStateful()
Determine if this is a stateful locator.
|
<S> StatefulEJBLocator<? extends S> |
narrowAsStateful(Class<S> type)
Narrow this locator to the target type as a stateful locator.
|
<S> StatefulEJBLocator<? extends S> |
narrowTo(Class<S> type)
Narrow this locator to the target type.
|
String |
toString() |
StatefulEJBLocator<T> |
withNewAffinity(Affinity affinity)
Create a copy of this locator, but with the new given affinity.
|
StatelessEJBLocator<T> |
withoutSession()
Get a copy of this stateful EJB locator, but without any session ID.
|
StatefulEJBLocator<T> |
withSession(SessionID sessionId)
Create a copy of this locator, but with the given stateful session ID.
|
StatefulEJBLocator<T> |
withSessionAndAffinity(SessionID sessionId,
Affinity affinity)
Create a copy of this locator, but with the given affinity and stateful session ID.
|
asStateless, canNarrowTo, createProxyInstance, getAffinity, getAppName, getBeanName, getDistinctName, getIdentifier, getModuleName, getProxyClass, getProxyConstructor, getViewType, hashCode, isEntity, isHome, isStateless, narrowAsEntity, narrowAsHome, narrowAsStateless
public StatefulEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, SessionID sessionId)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean namesessionId
- the stateful session IDpublic StatefulEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, SessionID sessionId, Affinity affinity)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean namesessionId
- the stateful session IDaffinity
- The Affinity
for this stateful bean locatorpublic StatefulEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, SessionID sessionId)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean namedistinctName
- the distinct namesessionId
- the stateful session IDpublic StatefulEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, SessionID sessionId, Affinity affinity)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean namedistinctName
- the distinct namesessionId
- the stateful session IDaffinity
- The Affinity
for this stateful bean locatorpublic StatefulEJBLocator(Class<T> viewType, EJBIdentifier identifier, SessionID sessionId, Affinity affinity)
viewType
- the view typeidentifier
- the EJB identifiersessionId
- the stateful session IDaffinity
- the Affinity
for this stateful bean locatorpublic StatefulEJBLocator(Class<T> viewType, EJBIdentifier identifier, SessionID sessionId)
viewType
- the view typeidentifier
- the EJB identifiersessionId
- the stateful session IDpublic StatefulEJBLocator(StatefulEJBLocator<T> original, Affinity newAffinity)
original
- the original locatornewAffinity
- the new affinitypublic StatefulEJBLocator(EJBLocator<T> original, SessionID sessionId)
original
- the original locatorsessionId
- the session IDpublic StatefulEJBLocator(EJBLocator<T> original, SessionID sessionId, Affinity newAffinity)
original
- the original locatorsessionId
- the session IDnewAffinity
- the new affinitypublic static <T> StatefulEJBLocator<T> create(Class<T> viewType, EJBIdentifier identifier, SessionID sessionId, Affinity affinity)
T
- the remote view typeviewType
- the view type (must not be null
)identifier
- the EJB identifier (must not be null
)sessionId
- the stateful session ID (must not be null
)affinity
- the Affinity
for this stateful bean locatornull
)public StatelessEJBLocator<T> withoutSession()
null
)public StatefulEJBLocator<T> withSession(SessionID sessionId)
EJBLocator
withSession
in class EJBLocator<T>
sessionId
- the stateful session ID (must not be null
)null
)public StatefulEJBLocator<T> withNewAffinity(Affinity affinity)
EJBLocator
withNewAffinity
in class EJBLocator<T>
affinity
- the new affinitypublic StatefulEJBLocator<T> withSessionAndAffinity(SessionID sessionId, Affinity affinity)
EJBLocator
withSessionAndAffinity
in class EJBLocator<T>
sessionId
- the stateful session ID (must not be null
)affinity
- the new affinity (must not be null
)null
)public <S> StatefulEJBLocator<? extends S> narrowTo(Class<S> type)
EJBLocator
narrowTo
in class EJBLocator<T>
S
- the target typetype
- the target type classpublic <S> StatefulEJBLocator<? extends S> narrowAsStateful(Class<S> type)
EJBLocator
narrowAsStateful
in class EJBLocator<T>
S
- the target typetype
- the target type classpublic StatefulEJBLocator<T> asStateful()
EJBLocator
asStateful
in class EJBLocator<T>
public boolean isStateful()
EJBLocator
EJBLocator.asStateful()
and EJBLocator.narrowAsStateful(Class)
will generally succeed.isStateful
in class EJBLocator<T>
true
if this locator is stateful, false
otherwisepublic SessionID getSessionId()
public boolean equals(Object other)
equals
in class EJBLocator<T>
other
- the other objecttrue
if they are equal, false
otherwisepublic boolean equals(EJBLocator<?> other)
equals
in class EJBLocator<T>
other
- the other objecttrue
if they are equal, false
otherwisepublic boolean equals(StatefulEJBLocator<?> other)
other
- the other objecttrue
if they are equal, false
otherwisepublic String toString()
toString
in class EJBLocator<T>
Copyright © 2017 JBoss by Red Hat. All rights reserved.