!str #16992 Rework Source and Sink name parameter

* Remove name parameter (no overloads), naming is performed using `.withAttributes` or the new
  convenience `.named`. Those adds the OperationAttribute.Name and also change the name of the
  shape Inlet and Outlet.

* Remove Source/Sink parameter list for 0 parameter methods,
  this allows usage of `Sink.head` instead of `Sink.head()`
This commit is contained in:
Patrik Nordwall 2015-03-05 12:21:17 +01:00
parent 53e3dcad06
commit 3dc4e6d077
75 changed files with 336 additions and 364 deletions

View file

@ -276,10 +276,10 @@ public class SourceTest extends StreamTest {
final JavaTestKit probe = new JavaTestKit(system);
final Iterable<String> input = Arrays.asList("A", "B", "C");
Source.from(input).runWith(Sink.<String>onComplete(new Procedure<BoxedUnit>() {
Source.from(input).runWith(Sink.<String>onComplete(new Procedure<Try<BoxedUnit>>() {
@Override
public void apply(BoxedUnit param) throws Exception {
probe.getRef().tell(param, ActorRef.noSender());
public void apply(Try<BoxedUnit> param) throws Exception {
probe.getRef().tell(param.get(), ActorRef.noSender());
}
}), materializer);