Lines Matching refs:CommandHandler

28  * Composite CommandHandler that manages an internal list of CommandHandlers to which it delegates.

30 * CommandHandler in the list, each invocation of this composite handler will invoke (delegate to)
31 * the current internal CommandHander. Then it moves on the next CommandHandler in the internal list.
33 * The following example replaces the CWD CommandHandler with a <code>SimpleCompositeCommandHandler</code>.
39 * CommandHandler commandHandler1 = new StaticReplyCommandHandler(500);
40 * CommandHandler commandHandler2 = new CwdCommandHandler();
53 public final class SimpleCompositeCommandHandler implements CommandHandler, ReplyTextBundleAware {
59 * Add a CommandHandler to the internal list of handlers.
61 * @param commandHandler - the CommandHandler
65 public void addCommandHandler(CommandHandler commandHandler) {
81 * Return the CommandHandler corresponding to the specified invocation index. In other words, return
82 * the CommandHandler instance to which the Nth {@link #handleCommand(Command, Session)} has been or will
85 * @return the CommandHandler
87 * @throws AssertFailedException - if no CommandHandler is defined for the index or the index is not valid
89 public CommandHandler getCommandHandler(int index) {
90 Assert.isTrue(index < commandHandlers.size(), "No CommandHandler defined for index " + index);
92 return (CommandHandler) commandHandlers.get(index);
96 * @see org.mockftpserver.core.command.CommandHandler#handleCommand(org.mockftpserver.core.command.Command, org.mockftpserver.core.session.Session)
101 Assert.isTrue(commandHandlers.size() > invocationIndex, "No CommandHandler defined for invocation #" + invocationIndex);
103 CommandHandler commandHandler = (CommandHandler) commandHandlers.get(invocationIndex);
124 CommandHandler commandHandler = (CommandHandler) iter.next();