.. java:import:: ch.epfl.leb.sass.server RemoteSimulationService .. java:import:: org.apache.thrift TException .. java:import:: org.apache.thrift.protocol TBinaryProtocol .. java:import:: org.apache.thrift.protocol TProtocol .. java:import:: org.apache.thrift.transport TSocket .. java:import:: org.apache.thrift.transport TTransport .. java:import:: java.util.logging Logger .. java:import:: java.util.logging Level RPCClient ========= .. java:package:: ch.epfl.leb.sass.client :noindex: .. java:type:: public class RPCClient A client for interaction with the SASS RPCServer. :author: Kyle M. Douglass Constructors ------------ RPCClient ^^^^^^^^^ .. java:constructor:: public RPCClient(String hostUrl, int port) :outertype: RPCClient Creates a RPCClient instance for communications with the RPCServer. For RPCServers running on the same machine, use "localhost" for the hostUrl argument. :param hostUrl: The URL of the RPCServer. :param port: The port that the RPCServer is listening on. Methods ------- close ^^^^^ .. java:method:: public void close() :outertype: RPCClient Closes the transport layer to the server. This method must be called before the program terminates. finalize ^^^^^^^^ .. java:method:: @Override protected void finalize() throws Throwable :outertype: RPCClient Safety check that the transport layer is properly closed. getClient ^^^^^^^^^ .. java:method:: public RemoteSimulationService.Client getClient() :outertype: RPCClient Returns a copy of service client. Use the client to make calls to the RPC server. :return: A copy of the RemoteSimulationService client.