T
- the type of values that this Tap can consume and supplypublic class Tap<T> extends Object implements Consumer<T>, Supplier<T>
Tap
provides a limited window into an event stream. Using a Tap
one can
inspect the current event passing through a stream. A Tap
's value will be
continually updated as data passes through the stream, so a call to get()
will
return the last value seen by the event stream.Constructor and Description |
---|
Tap()
Create a
Tap . |
Modifier and Type | Method and Description |
---|---|
void |
accept(T value)
Execute the logic of the action, accepting the given parameter.
|
T |
get()
Get the value of this
Tap , which is the current value of the event stream this
tap is consuming. |
public T get()
Tap
, which is the current value of the event stream this
tap is consuming.Copyright © 2017. All rights reserved.