public CommandInvoker<Void, Object> create(ShellSession session) throws CommandNotFoundException, CommandException { LinkedList<CommandInvoker> pipes = new LinkedList<CommandInvoker>(); for (PipeLineFactory current = this;current != null;current = current.next) { Command<?> command = session.getCommand(current.name); if (command == null) { throw new CommandNotFoundException(current.name); } CommandInvoker commandInvoker = command.resolveInvoker(current.rest); if (commandInvoker == null) { throw new CommandNotFoundException(current.name); } pipes.add(commandInvoker); } return new PipeLine(pipes.toArray(new CommandInvoker[pipes.size()])); }
public CommandInvoker<Void, Object> create(ShellSession session) throws CommandNotFoundException, CommandException { LinkedList<CommandInvoker> pipes = new LinkedList<CommandInvoker>(); for (PipeLineFactory current = this;current != null;current = current.next) { Command<?> command = session.getCommand(current.name); if (command == null) { throw new CommandNotFoundException(current.name); } CommandInvoker commandInvoker = command.resolveInvoker(current.rest); if (commandInvoker == null) { throw new CommandNotFoundException(current.name); } pipes.add(commandInvoker); } return new PipeLine(pipes.toArray(new CommandInvoker[pipes.size()])); }
public CommandInvoker<Void, Object> create(ShellSession session) throws CommandNotFoundException, CommandException { LinkedList<CommandInvoker> pipes = new LinkedList<CommandInvoker>(); for (PipeLineFactory current = this;current != null;current = current.next) { Command<?> command = session.getCommand(current.name); if (command == null) { throw new CommandNotFoundException(current.name); } CommandInvoker commandInvoker = command.resolveInvoker(current.rest); if (commandInvoker == null) { throw new CommandNotFoundException(current.name); } pipes.add(commandInvoker); } return new PipeLine(pipes.toArray(new CommandInvoker[pipes.size()])); }