There are many ways, here 2 from the top of my head.
Write a
Command
class that contain the type of the command and parameters, than Serialize it and send it to the server <> client.Choose a Protocol(Language that both of the server and the client will comply) and Serialize it using JSON/XML.
Example: (Not have been tested)
public class Command {
CommandType _commandType;
String _param;
public Command(CommandType commandType, String param)
{
setCommandType(commandType);
setParam(param);
}
public CommandType getCommandType() { return _commandType; }
public void setCommandType(CommandType commandType) { _commandType = commandType; }
public String getParam() { return _param; }
public void setParam(String param) { _param = param; }
}
public enum CommandType {
CREATE_EMPLOYEE, DELETE_EMPLOYEE
}