Package io.smallrye.mutiny
Class ItemWithContext<T>
- java.lang.Object
-
- io.smallrye.mutiny.ItemWithContext<T>
-
- Type Parameters:
T
- the iten type
@Experimental("Context support is a new experimental API introduced in Mutiny 1.3.0") public final class ItemWithContext<T> extends java.lang.Object
Models an item flowing along a Mutiny pipeline with its subscriber context attached.- See Also:
Uni.attachContext()
,Multi.attachContext()
-
-
Constructor Summary
Constructors Constructor Description ItemWithContext(Context context, T item)
Creates a new item with a context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Context
context()
Gives the context.boolean
equals(java.lang.Object o)
T
get()
Gives the item.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
context
public Context context()
Gives the context.- Returns:
- the context
-
get
public T get()
Gives the item.- Returns:
- the item
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-