org/sonews/daemon/command/UnsupportedCommand.java
changeset 19 91dc9acb03ed
parent 1 6fceb66e1ad7
child 20 6ae5e4f8329b
     1.1 --- a/org/sonews/daemon/command/UnsupportedCommand.java	Fri Jun 26 16:48:50 2009 +0200
     1.2 +++ b/org/sonews/daemon/command/UnsupportedCommand.java	Fri Aug 21 17:40:54 2009 +0200
     1.3 @@ -27,14 +27,18 @@
     1.4   * @author Christian Lins
     1.5   * @since sonews/0.5.0
     1.6   */
     1.7 -public class UnsupportedCommand extends AbstractCommand
     1.8 +public class UnsupportedCommand implements Command
     1.9  {
    1.10 +  
    1.11 +  /**
    1.12 +   * @return Always returns null.
    1.13 +   */
    1.14 +  @Override
    1.15 +  public String[] getSupportedCommandStrings()
    1.16 +  {
    1.17 +    return null;
    1.18 +  }
    1.19  
    1.20 -  public UnsupportedCommand(final NNTPConnection conn)
    1.21 -  {
    1.22 -    super(conn);
    1.23 -  }
    1.24 -  
    1.25    @Override
    1.26    public boolean hasFinished()
    1.27    {
    1.28 @@ -42,10 +46,16 @@
    1.29    }
    1.30  
    1.31    @Override
    1.32 -  public void processLine(final String line)
    1.33 +  public boolean isStateful()
    1.34 +  {
    1.35 +    return false;
    1.36 +  }
    1.37 +
    1.38 +  @Override
    1.39 +  public void processLine(NNTPConnection conn, final String line, byte[] raw)
    1.40      throws IOException
    1.41    {
    1.42 -    printStatus(500, "command not supported");
    1.43 +    conn.println("500 command not supported");
    1.44    }
    1.45    
    1.46  }