title: command pattern for this scenario? advice
body: <p>good evening all. ive been reading up on the command pattern and im wondering if it's a good fit for what i want to build. </p>
  
  <p>essentially, i have a client that forms a socket connection with a server. there is 1 class 'foo' on my server that the client needs to invoke methods against. </p>
  
  <p>lets say foo has 5 methods that my client will invoke. i have made the mistake in the past of marshalling an object that is demarshalled on the server. then i check a variable in the object and using a switch statement, the server logic can determine what action should be invoked. </p>
  
  <p>i want to avoid this and so i believe the command pattern may help me. but, for my example 'foo' class on the server, do i need to create a command class for each method that is to be invoked in foo? should the class that is sent from the client to the server be a command class? will i only need 1 receiver in this case? - the foo class? </p>
  
  <p>thanks very much for your help and sorry about the 'foo' class name here. i havent got any concrete class names yet!</p>
  
  <p>best regards</p>