Exemplo n.º 1
0
 public double getBalance() {
   try {
     arguments = null;
     String methodName = "getBalance";
     sendMethodCall(methodName);
     ReturnValue retValue = receiveResponse();
     Double i = (Double) retValue.getValue();
     return i;
   } catch (UnknownHostException e) {
     e.printStackTrace();
   } catch (IOException e) {
     e.printStackTrace();
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   }
   return -1;
 }
Exemplo n.º 2
0
 protected void checkForExceptions(ReturnValue returnValue) {
   if (returnValue.getException() != null) {
     throw returnValue.getException();
   }
 }