public void handleError(Channel channel, IOException e) { future.setException(e); }
public void handleEnd(Channel channel) { future.setException(new IOException("Channel ended")); }
private synchronized void cancelAllRequests(final IOException io) { for (VersionedIoFuture current : requests.values()) { current.setException(io); } requests.clear(); }
public void handleMessage(Channel channel, MessageInputStream messageInputStream) { DataInputStream dis = new DataInputStream(messageInputStream); try { log.tracef("Bytes Available %d", dis.available()); byte[] firstThree = new byte[3]; dis.read(firstThree); log.tracef("First Three %s", new String(firstThree)); if (Arrays.equals(firstThree, "JMX".getBytes()) == false) { throw new IOException("Invalid leading bytes in header."); } log.tracef("Bytes Available %d", dis.available()); String connectionId = dis.readUTF(); future.setResult(connectionId); } catch (IOException e) { future.setException(e); } finally { IoUtils.safeClose(dis); } }
response.e = unmarshaller.readObject(Exception.class); } else { future.setException(new IOException("Outcome not understood")); future.setException(new IOException(e)); } catch (ClassNotFoundException e) { future.setException(new IOException(e)); } catch (IOException e) { future.setException(e);
public void handleError(Channel channel, IOException e) { future.setException(e); }
public void handleError(Channel channel, IOException e) { future.setException(e); }
public void handleEnd(Channel channel) { future.setException(new IOException("Channel ended")); }
private synchronized void cancelAllRequests(final IOException io) { for (VersionedIoFuture current : requests.values()) { current.setException(io); } requests.clear(); }
public void handleEnd(Channel channel) { future.setException(new IOException("Channel ended")); }
private synchronized void cancelAllRequests(final IOException io) { for (VersionedIoFuture current : requests.values()) { current.setException(io); } requests.clear(); }
response.e = unmarshaller.readObject(Exception.class); } else { future.setException(new IOException("Outcome not understood")); future.setException(new IOException(e)); } catch (ClassNotFoundException e) { future.setException(new IOException(e)); } catch (IOException e) { future.setException(e);
public void handleMessage(Channel channel, MessageInputStream messageInputStream) { DataInputStream dis = new DataInputStream(messageInputStream); try { log.tracef("Bytes Available %d", dis.available()); byte[] firstThree = new byte[3]; dis.read(firstThree); log.tracef("First Three %s", new String(firstThree)); if (Arrays.equals(firstThree, "JMX".getBytes()) == false) { throw new IOException("Invalid leading bytes in header."); } log.tracef("Bytes Available %d", dis.available()); String connectionId = dis.readUTF(); future.setResult(connectionId); } catch (IOException e) { future.setException(e); } finally { IoUtils.safeClose(dis); } }
response.e = unmarshaller.readObject(Exception.class); } else { future.setException(new IOException("Outcome not understood")); future.setException(new IOException(e)); } catch (ClassNotFoundException e) { future.setException(new IOException(e)); } catch (IOException e) { future.setException(e);
public void handleMessage(Channel channel, MessageInputStream messageInputStream) { DataInputStream dis = new DataInputStream(messageInputStream); try { log.tracef("Bytes Available %d", dis.available()); byte[] firstThree = new byte[3]; dis.read(firstThree); log.tracef("First Three %s", new String(firstThree)); if (Arrays.equals(firstThree, "JMX".getBytes()) == false) { throw new IOException("Invalid leading bytes in header."); } log.tracef("Bytes Available %d", dis.available()); String connectionId = dis.readUTF(); future.setResult(connectionId); } catch (IOException e) { future.setException(e); } finally { IoUtils.safeClose(dis); } }