Designing API to start and stop a process with Jersey
<p>I am developing a REST web server with Java and Jersey. This is my first web application and I want to be sure that I am structuring the application well. I created my first function which is working well:</p>

<pre class="lang-java prettyprint-override"><code>@Path("/startAuto") 
public class Rest {

    @GET
    public String startAuto() {
        try {
            ProcessBuilder pb = new ProcessBuilder("/startAuto.sh");
            Process p = pb.start();     
            p.waitFor();                
            return ("Auto Started");
        } catch (Exception e) {
            e.printStackTrace();
            return ("error");
        }
    }
}
</code></pre>

<p>I want to add a new function like <code>stopAuto</code>.</p>

<p>Which is cleaner: adding the function in this class or create a new class? </p>