org/sonews/daemon/command/UnsupportedCommand.java
changeset 3 2fdc9cc89502
parent 1 6fceb66e1ad7
child 20 6ae5e4f8329b
     1.1 --- a/org/sonews/daemon/command/UnsupportedCommand.java	Wed Jul 01 10:48:22 2009 +0200
     1.2 +++ b/org/sonews/daemon/command/UnsupportedCommand.java	Wed Jul 22 14:04:05 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  }