/** * Construct a new instance. * * @param locator the locator for the EJB instance (must not be {@code null}) * @param <T> the EJB object type * @return the handle (not {@code null}) */ public static <T extends EJBObject> EJBHandle<T> create(EJBLocator<T> locator) { return new EJBHandle<>(locator); }
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ public boolean equals(Object other) { return other instanceof EJBHandle && equals((EJBHandle<?>) other); }
return EJBHandle.create(locatorRef.get().narrowTo(EJBObject.class));
} else if (object instanceof EJBHandle) { final EJBHandle<?> handle = (EJBHandle<?>) object; final EJBLocator<?> locator = handle.getLocator(); final EjbIIOPService factory = serviceForLocator(locator, deploymentRepository); if (factory != null) {
return EJBHandle.create(locatorRef.get().narrowTo(EJBObject.class));
} else if (object instanceof EJBHandle) { final EJBHandle handle = (EJBHandle) object; final EJBLocator<?> locator = handle.getLocator(); final EjbIIOPService factory = serviceForLocator(locator, deploymentRepository); if (factory != null) {
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ public boolean equals(Object other) { return other instanceof EJBHandle && equals((EJBHandle<?>) other); }
/** * Construct a new instance. * * @param locator the locator for the EJB instance (must not be {@code null}) * @param <T> the EJB object type * @return the handle (not {@code null}) */ public static <T extends EJBObject> EJBHandle<T> create(EJBLocator<T> locator) { return new EJBHandle<>(locator); }
return EJBHandle.create(locatorRef.get().narrowTo(EJBObject.class));
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ public boolean equals(Object other) { return other instanceof EJBHandle && equals((EJBHandle<?>) other); }
/** * Construct a new instance. * * @param locator the locator for the EJB instance (must not be {@code null}) * @param <T> the EJB object type * @return the handle (not {@code null}) */ public static <T extends EJBObject> EJBHandle<T> create(EJBLocator<T> locator) { return new EJBHandle<>(locator); }