/** * Remove a value attached to the proxy. * * @param key the attachment key * @param <T> the value type * @return the value, or {@code null} if there is none */ public <T> T removeProxyAttachment(final AttachmentKey<T> key) { return invocationHandler.removeAttachment(key); }
/** * Remove a proxy attachment. * * @param proxy the proxy (must not be {@code null}) * @param attachmentKey the attachment key to use (must not be {@code null}) * @param <T> the value type * @return the previous attachment value or {@code null} if the attachment previously did not exist * @throws IllegalArgumentException if a required parameter is {@code null} or if the object is not a valid EJB client proxy */ public static <T> T removeProxyAttachment(Object proxy, AttachmentKey<T> attachmentKey) throws IllegalArgumentException { Assert.checkNotNullParam("proxy", proxy); Assert.checkNotNullParam("attachmentKey", attachmentKey); return EJBInvocationHandler.forProxy(proxy).removeAttachment(attachmentKey); }
/** * Remove a proxy attachment with a particular value. * * @param proxy the proxy (must not be {@code null}) * @param attachmentKey the attachment key to use (must not be {@code null}) * @param oldValue the new value to set (must not be {@code null}) * @param <T> the value type * @return {@code true} if the attachment was removed, or {@code false} if the value did not match or was not present * @throws IllegalArgumentException if a required parameter is {@code null} or if the object is not a valid EJB client proxy */ public static <T> boolean removeProxyAttachment(Object proxy, AttachmentKey<T> attachmentKey, T oldValue) throws IllegalArgumentException { Assert.checkNotNullParam("proxy", proxy); Assert.checkNotNullParam("attachmentKey", attachmentKey); Assert.checkNotNullParam("oldValue", oldValue); return EJBInvocationHandler.forProxy(proxy).removeAttachment(attachmentKey, oldValue); }
/** * Remove a value attached to the proxy. * * @param key the attachment key * @param <T> the value type * @return the value, or {@code null} if there is none */ public <T> T removeProxyAttachment(final AttachmentKey<T> key) { return invocationHandler.removeAttachment(key); }
/** * Remove a value attached to the proxy. * * @param key the attachment key * @param <T> the value type * @return the value, or {@code null} if there is none */ public <T> T removeProxyAttachment(final AttachmentKey<T> key) { return invocationHandler.removeAttachment(key); }
/** * Remove a proxy attachment. * * @param proxy the proxy (must not be {@code null}) * @param attachmentKey the attachment key to use (must not be {@code null}) * @param <T> the value type * @return the previous attachment value or {@code null} if the attachment previously did not exist * @throws IllegalArgumentException if a required parameter is {@code null} or if the object is not a valid EJB client proxy */ public static <T> T removeProxyAttachment(Object proxy, AttachmentKey<T> attachmentKey) throws IllegalArgumentException { Assert.checkNotNullParam("proxy", proxy); Assert.checkNotNullParam("attachmentKey", attachmentKey); return EJBInvocationHandler.forProxy(proxy).removeAttachment(attachmentKey); }
/** * Remove a proxy attachment. * * @param proxy the proxy (must not be {@code null}) * @param attachmentKey the attachment key to use (must not be {@code null}) * @param <T> the value type * @return the previous attachment value or {@code null} if the attachment previously did not exist * @throws IllegalArgumentException if a required parameter is {@code null} or if the object is not a valid EJB client proxy */ public static <T> T removeProxyAttachment(Object proxy, AttachmentKey<T> attachmentKey) throws IllegalArgumentException { Assert.checkNotNullParam("proxy", proxy); Assert.checkNotNullParam("attachmentKey", attachmentKey); return EJBInvocationHandler.forProxy(proxy).removeAttachment(attachmentKey); }
/** * Remove a proxy attachment with a particular value. * * @param proxy the proxy (must not be {@code null}) * @param attachmentKey the attachment key to use (must not be {@code null}) * @param oldValue the new value to set (must not be {@code null}) * @param <T> the value type * @return {@code true} if the attachment was removed, or {@code false} if the value did not match or was not present * @throws IllegalArgumentException if a required parameter is {@code null} or if the object is not a valid EJB client proxy */ public static <T> boolean removeProxyAttachment(Object proxy, AttachmentKey<T> attachmentKey, T oldValue) throws IllegalArgumentException { Assert.checkNotNullParam("proxy", proxy); Assert.checkNotNullParam("attachmentKey", attachmentKey); Assert.checkNotNullParam("oldValue", oldValue); return EJBInvocationHandler.forProxy(proxy).removeAttachment(attachmentKey, oldValue); }
/** * Remove a proxy attachment with a particular value. * * @param proxy the proxy (must not be {@code null}) * @param attachmentKey the attachment key to use (must not be {@code null}) * @param oldValue the new value to set (must not be {@code null}) * @param <T> the value type * @return {@code true} if the attachment was removed, or {@code false} if the value did not match or was not present * @throws IllegalArgumentException if a required parameter is {@code null} or if the object is not a valid EJB client proxy */ public static <T> boolean removeProxyAttachment(Object proxy, AttachmentKey<T> attachmentKey, T oldValue) throws IllegalArgumentException { Assert.checkNotNullParam("proxy", proxy); Assert.checkNotNullParam("attachmentKey", attachmentKey); Assert.checkNotNullParam("oldValue", oldValue); return EJBInvocationHandler.forProxy(proxy).removeAttachment(attachmentKey, oldValue); }