Package ds.pjftp.settings

Examples of ds.pjftp.settings.ServerSettings


     * @throws IOException if failed to load the settings.
     */
    @Override
    public ServerSettings load() throws IOException {

        ServerSettings settings = null;

        try (BufferedReader reader = Files.newBufferedReader(
                settingsFile, Charset.forName(ENCODING)))
        {
            final Unmarshaller unmarshaller = JAXBContext.newInstance(
View Full Code Here


        if (param.length() == 0) {
            name = "anonymous";
        } else {
            name = param;

            final ServerSettings settings = SettingsHolder.getInstance().getSettings();
            final FtpUser user = settings.getUserList().get(name);

            if (user == null) {
                session.replyWithSpace(530, "Invalid user name.");
                return;
            }
View Full Code Here

    /**
     * Interprets client's request and invokes appropriate handler.
     */
    private void interpretClientRequest() throws IOException {

        final ServerSettings settings = SettingsHolder.getInstance().getSettings();
        session.replyWithSpace(220, settings.getWelcomeMessage());

        ClientRequest request = null;
        while ((request = session.readRequest()) != null) {

            final String reqCmd = request.getCommand();
View Full Code Here

        if (sessionUser.getPassword() != null) {
            session.replyWithSpace(202, "Already logged-in.");
            return;
        }

        final ServerSettings settings = SettingsHolder.getInstance().getSettings();
        final FtpUser user = settings.getUserList().get(sessionUser.getUsername());

        // Checking password. For anonymous user it doesn't
        // matter what password he has.
        if (!param.equals(user.getPassword()) &&
            !sessionUser.getUsername().equals("anonymous"))
View Full Code Here

TOP

Related Classes of ds.pjftp.settings.ServerSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.