Class OperationContext.AttachmentKey<T>

  • Type Parameters:
    T - the attachment value type
    Enclosing interface:
    OperationContext

    public static final class OperationContext.AttachmentKey<T>
    extends Object
    An attachment key instance.
    • Method Detail

      • cast

        public T cast​(Object value)
        Cast the value to the type of this attachment key.
        Parameters:
        value - the value
        Returns:
        the cast value
      • create

        public static <T> OperationContext.AttachmentKey<T> create​(Class<? super T> valueClass)
        Construct a new simple attachment key.
        Type Parameters:
        T - the attachment type
        Parameters:
        valueClass - the value class
        Returns:
        the new instance