Class EJBHandle<T extends EJBObject>

    • Constructor Detail

      • EJBHandle

        public EJBHandle​(EJBLocator<T> locator)
        Construct a new instance.
        Parameters:
        locator - the locator for the EJB instance
    • Method Detail

      • create

        public static <T extends EJBObjectEJBHandle<T> create​(EJBLocator<T> locator)
        Construct a new instance.
        Type Parameters:
        T - the Enterprise Beans object type
        Parameters:
        locator - the locator for the Enterprise Beans instance (must not be null)
        Returns:
        the handle (not null)
      • getEJBObject

        public T getEJBObject()
                       throws RemoteException
        Obtain the enterprise bean object reference represented by this handle.
        Specified by:
        getEJBObject in interface Handle
        Returns:
        the enterprise bean object reference represented by this handle.
        Throws:
        RemoteException - The enterprise bean object could not be obtained because of a system-level failure.
      • equals

        public boolean equals​(Object other)
        Determine whether this object is equal to another.
        Overrides:
        equals in class Object
        Parameters:
        other - the other object
        Returns:
        true if they are equal, false otherwise
      • equals

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

        public int hashCode()
        Get the hash code for this Enterprise Bean handle.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code
      • getLocator

        public EJBLocator<T> getLocator()
        Get the locator for this handle.
        Returns:
        the locator for this handle