@Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(FAILURE); output.writeByte(EXCEPTION); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(e); marshaller.finish(); } });
protected void writeResponse(final byte inResponseTo, final int correlationId) throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); } }); }
private void sendIOException(final Exception e) { try { writeResponse(e, messageId, correlationId); log.tracef("[%d] %h - Success Response Sent", correlationId, messageId); } catch (IOException ioe) { // Here there is nothing left we can do, we know we can not sent to the client though. log.error(ioe); } }
log.tracef("Message Received id(%h), correlationId(%d)", messageId, correlationId); final Common.MessageHandler mh = getHandlerRegistry().get(messageId); if (mh instanceof MessageHandler) { endReceiveLoop = ((MessageHandler) mh).endReceiveLoop();
@Override public void handleEnd(Channel channel) { end(); }
log.tracef("Message Received id(%h), correlationId(%d)", messageId, correlationId); final Common.MessageHandler mh = getHandlerRegistry().get(messageId); if (mh instanceof MessageHandler) { endReceiveLoop = ((MessageHandler) mh).endReceiveLoop();
public void handleError(Channel channel, IOException error) { log.warn("Channel closing due to error", error); end(); }
protected void writeResponse(final Exception e, final byte inResponseTo, final int correlationId) throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(FAILURE); output.writeByte(EXCEPTION); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(e); marshaller.finish(); } }); }
private void sendIOException(final Exception e) { try { writeResponse(e, messageId, correlationId); log.tracef("[%d] %h - Success Response Sent", correlationId, messageId); } catch (IOException ioe) { // Here there is nothing left we can do, we know we can not sent to the client though. log.error(ioe); } }
@Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(FAILURE); output.writeByte(EXCEPTION); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(e); marshaller.finish(); } });
log.tracef("Message Received id(%h), correlationId(%d)", messageId, correlationId); final Common.MessageHandler mh = getHandlerRegistry().get(messageId); if (mh instanceof MessageHandler) { endReceiveLoop = ((MessageHandler) mh).endReceiveLoop();
@Override public void handleEnd(Channel channel) { end(); }
protected void writeResponse(final String response, final byte inResponseTo, final int correlationId) throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); output.writeByte(STRING); output.writeUTF(response); } }); }
private void sendIOException(final Exception e) { try { writeResponse(e, messageId, correlationId); log.tracef("[%d] %h - Success Response Sent", correlationId, messageId); } catch (IOException ioe) { // Here there is nothing left we can do, we know we can not sent to the client though. log.error(ioe); } }
@Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(FAILURE); output.writeByte(EXCEPTION); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(e); marshaller.finish(); } });
public void handleError(Channel channel, IOException error) { log.warn("Channel closing due to error", error); end(); }
protected void sendWelcomeMessage() throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeBytes("JMX"); } }); log.tracef("Written welcome message"); }
protected void writeResponse(final String response, final byte inResponseTo, final int correlationId) throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); output.writeByte(STRING); output.writeUTF(response); } }); }
protected void writeResponse(final byte inResponseTo, final int correlationId) throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); } }); }
protected void writeResponse(final byte inResponseTo, final int correlationId) throws IOException { write(new MessageWriter() { @Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); } }); }