private void checkClosed() throws GridClientClosedException {
  if (closed.get())   throw new GridClientClosedException("Client was closed (no public methods of client can be used anymore).");
}

private void checkClosed ( ) throws GridClientClosedException { if ( closed . get ( ) ) throw new GridClientClosedException ( "Client was closed (no public methods of client can be used anymore)." ) ; }
checks and throws an exception if this client was closed .
