@Override public void sendObject(Object data) throws IOException, EncodeException { checkNotNull(data, "data"); final Future<?> future = sendSyncObject(data); try { future.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } else if (e.getCause() instanceof EncodeException) { throw (EncodeException) e.getCause(); } else { throw new IOException(e.getCause()); } } session.restartIdleTimeoutExecutor(); }
@Override public void sendObject(Object data) throws IOException, EncodeException { checkNotNull(data, "data"); final Future<?> future = sendSyncObject(data); try { future.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } else if (e.getCause() instanceof EncodeException) { throw (EncodeException) e.getCause(); } else { throw new IOException(e.getCause()); } } session.restartIdleTimeoutExecutor(); }