danny       01/11/30 03:20:16

  Modified:    src/java/org/apache/james/remotemanager
                        RemoteManagerHandler.java
  Log:
  added "shutdown" which calls System.exit()
  This is simpler than killing a daemon process where the pid isn't known,
  but it doesn't address the graceful shutdown issue
  
  Revision  Changes    Path
  1.6       +7 -2      
jakarta-james/src/java/org/apache/james/remotemanager/RemoteManagerHandler.java
  
  Index: RemoteManagerHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/remotemanager/RemoteManagerHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RemoteManagerHandler.java 2001/11/05 13:27:21     1.5
  +++ RemoteManagerHandler.java 2001/11/30 11:20:16     1.6
  @@ -44,8 +44,8 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Peter Donald</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Charles Benett</a>
    *
  - * Last changed by: $Author: serge $ on $Date: 2001/11/05 13:27:21 $
  - * $Revision: 1.5 $
  + * Last changed by: $Author: danny $ on $Date: 2001/11/30 11:20:16 $
  + * $Revision: 1.6 $
    *
    */
   public class RemoteManagerHandler
  @@ -295,6 +295,7 @@
               out.println("unsetalias [username]                   removes a user's 
alias");
               out.println("setforwarding [username] [emailaddress] forwards a user's 
email to another account");
               out.println("user [repositoryname]                   change to another 
user repository");
  +            out.println("shutdown                                kills the current 
JVM (convenient when James is run as a daemon)");
               out.println("quit                                    close connection");
               out.flush();
           } else if (command.equalsIgnoreCase("SETALIAS")) {
  @@ -433,6 +434,10 @@
   
           } else if (command.equalsIgnoreCase("QUIT")) {
               out.println("bye");
  +            return false;
  +        } else if (command.equalsIgnoreCase("SHUTDOWN")) {
  +            out.println("shuting down, bye bye");
  +            System.exit(0);
               return false;
           } else {
               out.println("unknown command " + command);
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to