public FtpletResult beforeCommand(FtpSession session, FtpRequest request) throws FtpException, IOException { FtpletResult retVal = FtpletResult.DEFAULT; for (Entry<String, Ftplet> entry : ftplets.entrySet()) { retVal = entry.getValue().beforeCommand(session, request); if (retVal == null) { retVal = FtpletResult.DEFAULT; } // proceed only if the return value is FtpletResult.DEFAULT if (retVal != FtpletResult.DEFAULT) { break; } } return retVal; }