title: Callable<T> call() + Input parameters + Spring
body: <p>I am struggling with the following:</p>
  
  <ol>
  <li>The class is constructed through Spring</li>
  <li>It implements the interface that consist of two methods (process, shutdown) </li>
  <li>It also implements Callable</li>
  </ol>
  
  <p><strong>The problem:</strong> 
  process() returns a Type and it is called inside the call(), the problem is that process has input parameters which call() signature doesn’t allow. So I referred to this question: <a href="https://stackoverflow.com/questions/9992992/is-there-a-way-to-take-an-argument-in-a-callable-method">Is there a way to take an argument in a callable method?</a>, unfortunately that wouldn't work for me as my object constructed through Spring, process() gets called from the JSP and the input parameters are variable, depending on the user action.</p>
  
  <p><strong>Will include some code for clarification, bellow:</strong></p>
  
  <pre><code>public class MyClass implements MyClassInterface, Callable&lt;Results&gt; {
  
     private String fileLocation;
     private final SMTPMailer smtpMalier;
  
     public MyClass(String fileLocation, SMTPMailer smtpMalier) {
        this.fileLocation = fileLocation;
        this.smtpMalier = smtpMalier;
     }
  
     public Results call() {
        // to return process(arg1, arg2) here, need to cater for input parameters
     }
  
     public Results process(String arg1, String arg2) {
        // does some proceeding, returns Results
     }
  
     public void shutdown() {
        // shut down implementation
     }
  }
  </code></pre>
  
  <p>How can I go around this? </p>