title: Java: Send job to server for execution
body: <p>I'm looking for a way to execute "jobs" on a remote server. Normally RMI would do just fine but as far as I know, that requires an actual implementation of the logic on the server. My problem is that I can't predefine the jobs on the server because I want them to be as generic as possible.</p>
  
  <p>So what I have in mind is the following: the client has the implementation of a specific job he wants to have executed. This implementation would obviously have to follow a set of rules in order for the server to be able to work with it. The client packs it into an object of some kind, sends it to the server for execution, and waits for the result of whatever computation he asked for.</p>
  
  <p>Is this possible with RMI? If not, is there something else that allows me to work this way?</p>
  
  <p>Thank you for your time and insight.</p>