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

public final class StatelessEJBLocator<T> extends EJBLocator<T>
A locator for a stateless session EJB.
See Also:
  • Constructor Details

    • StatelessEJBLocator

      public StatelessEJBLocator(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
    • StatelessEJBLocator

      public StatelessEJBLocator(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
    • StatelessEJBLocator

      public StatelessEJBLocator(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
    • StatelessEJBLocator

      public StatelessEJBLocator(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
    • StatelessEJBLocator

      public StatelessEJBLocator(Class<T> viewType, EJBIdentifier identifier, Affinity affinity)
      Construct a new instance.
      Parameters:
      viewType - the view type
      identifier - the EJB identifier
      affinity - the affinity
    • StatelessEJBLocator

      public StatelessEJBLocator(Class<T> viewType, EJBIdentifier identifier)
      Construct a new instance.
      Parameters:
      viewType - the view type
      identifier - the EJB identifier
    • StatelessEJBLocator

      public StatelessEJBLocator(StatelessEJBLocator<T> original, Affinity newAffinity)
      Construct a new instance. This constructor creates a copy of the original locator, but with a new affinity.
      Parameters:
      original - the original locator
      newAffinity - 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 be null)
      identifier - the EJB identifier (must not be null)
      affinity - the Affinity for this stateful bean locator
      Returns:
      the new instance (not null)
    • create

      public static <T> StatelessEJBLocator<T> create(EJBLocator<T> original, Affinity newAffinity)
      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 be null)
      newAffinity - the new affinity
      Returns:
      the new instance (not null)
    • withNewAffinity

      public StatelessEJBLocator<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>
      Parameters:
      affinity - the new affinity
      Returns:
      the new locator
    • withSession

      public StatefulEJBLocator<T> withSession(SessionID sessionId)
      Description copied from class: EJBLocator
      Create a copy of this locator, but with the given stateful session ID. If this locator cannot be converted, an exception is thrown.
      Overrides:
      withSession in class EJBLocator<T>
      Parameters:
      sessionId - the stateful session ID (must not be null)
      Returns:
      the new locator (not null)
    • withSessionAndAffinity

      public StatefulEJBLocator<T> withSessionAndAffinity(SessionID sessionId, Affinity affinity)
      Description copied from class: EJBLocator
      Create 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:
      withSessionAndAffinity in class EJBLocator<T>
      Parameters:
      sessionId - the stateful session ID (must not be null)
      affinity - the new affinity (must not be null)
      Returns:
      the new locator (not null)
    • narrowTo

      public <S> StatelessEJBLocator<? extends S> narrowTo(Class<S> type)
      Description copied from class: EJBLocator
      Narrow this locator to the target type.
      Overrides:
      narrowTo in class EJBLocator<T>
      Type Parameters:
      S - the target type
      Parameters:
      type - the target type class
      Returns:
      this instance, narrowed to the given type
    • narrowAsStateless

      public <S> StatelessEJBLocator<? extends S> narrowAsStateless(Class<S> type)
      Description copied from class: EJBLocator
      Narrow this locator to the target type as a stateless locator.
      Overrides:
      narrowAsStateless in class EJBLocator<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

      public StatelessEJBLocator<T> asStateless()
      Description copied from class: EJBLocator
      Return this locator as a stateless locator, if it is one.
      Overrides:
      asStateless in class EJBLocator<T>
      Returns:
      this instance, cast as a stateless locator
    • isStateless

      public boolean isStateless()
      Description copied from class: EJBLocator
      Determine if this is a stateless locator. If so, calls to EJBLocator.asStateless() and EJBLocator.narrowAsStateless(Class) will generally succeed.
      Overrides:
      isStateless in class EJBLocator<T>
      Returns:
      true if this locator is stateless, false otherwise
    • equals

      public boolean equals(Object other)
      Determine whether this object is equal to another.
      Overrides:
      equals in class EJBLocator<T>
      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>
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise
    • equals

      public boolean equals(StatelessEJBLocator<?> other)
      Determine whether this object is equal to another.
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise