edu.jhu.tmaj.servlet
Class CommandServletClient
java.lang.Object
edu.jhu.tmaj.servlet.CommandServletClient
public final class CommandServletClient
- extends java.lang.Object
This class is responsible for sending all Request objects from the client to the server. All
requests made from the client to the server are done through this class. Make sure the
SERVLET_URL is pointed to the proper TMAJ server.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandServletClient
public CommandServletClient()
CommandServletClient
public CommandServletClient(java.net.URL servletUrl)
getInstance
public static CommandServletClient getInstance()
sendRequest
public CommandResponse sendRequest(CommandRequest request)
throws java.lang.RuntimeException
- Sends the ServerRequest object to the server to be executed. If there is an exception
sending the ServerRequest, return a default error ServerResponse.
TODO this should probably throw an IOException
- Parameters:
request
- the ServerRequest to be executed
- Returns:
- the ServerResponse containing data from the executed ServerRequest
- Throws:
java.lang.RuntimeException