Package org.jnode.nntp.exception

Examples of org.jnode.nntp.exception.UnknownCommandException


                throw new ProcessorNotFoundException();
            }
            return processor.process(parsedCommand.getParams(), selectedGroupId, selectedArticleId, auth);
        }

        throw new UnknownCommandException();
    }
View Full Code Here


    private NntpCommand findCommand(String command) {
        String[] parts = StringUtils.split(command, DELIMITER);
        NntpCommand foundedCommand;

        if (parts == null) {
            throw new UnknownCommandException();
        }

        if (parts.length == 1) {
            foundedCommand = NntpCommand.find(command);
            if (foundedCommand == null) {
                throw new UnknownCommandException();
            }
            foundedCommand.setParams(EMPTY_LIST);
            return foundedCommand;
        }

        foundedCommand = NntpCommand.find(parts[0] + DELIMITER + parts[1]);
        if (foundedCommand == null) {
            foundedCommand = findCommand(parts[0]);
            if (foundedCommand == null) {
                throw new UnknownCommandException();
            } else {
                foundedCommand.setParams(prepareParams(parts, true));
            }
        } else {
            foundedCommand.setParams(prepareParams(parts, false));
View Full Code Here


    @Override
    public Collection<String> process(Collection<String> params, Long selectedGroupId, Long selectedArticleId, Auth auth) {
        if (params == null || params.size() != 1) {
            throw new UnknownCommandException();
        }

        String user = params.iterator().next();

        String username = StringUtils.substring(user, 0, StringUtils.indexOf(user, "@"));
View Full Code Here

    @Override
    public Collection<String> process(Collection<String> params, Long selectedGroupId, Long selectedArticleId, Auth auth) {

        if (params == null || params.size() != 1) {
            throw new UnknownCommandException();
        }

        String pass = params.iterator().next();

        Link link = dataProvider.link(auth, pass);
View Full Code Here

TOP

Related Classes of org.jnode.nntp.exception.UnknownCommandException

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.