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