public int readUnsignedByte() throws IOException { return delegate.readUnsignedByte(); }
public void handleMessage(final Channel channel, final MessageInputStream message) { try { final int messageId = message.readUnsignedByte(); final int id = readId(message, version); final int result = message.readUnsignedByte(); if (result == Protocol.SUCCESS || result == Protocol.FAILURE) { tracker.signalResponse(id, messageId, message, true); } else { throw Messages.log.outcomeNotUnderstood(); } channel.receiveMessage(this); } catch (IOException e) { safeClose(channel); safeClose(message); } } });
public void handleMessage(final Channel channel, final MessageInputStream message) { try { final int code = message.readUnsignedByte(); switch (code) { case Protocol.COMPRESSED_INVOCATION_MESSAGE:
if (is.readUnsignedByte() != Protocol.M_RESP_UT_ROLLBACK) { throw Log.log.unknownResponse();
if (is.readUnsignedByte() != Protocol.M_RESP_UT_COMMIT) { throw Log.log.unknownResponse();
return; int length = mis.readUnsignedByte(); boolean hasOne = false, hasTwo = false; for (int i = 0; i < length; i ++) { int v = mis.readUnsignedByte() & 0x7f; if (v == 1) { hasOne = true;
throw Messages.log.invalidHeader(); int version = mis.readUnsignedByte(); boolean versionSupported = false; for (int supportedProtocolVersion : SUPPORTED_PROTOCOL_VERSIONS) {
try (MessageInputStream is = response.getInputStream()) { if (version == 1) { if (is.readUnsignedByte() != Protocol.P_LIST) { throw Messages.log.invalidResponse();
if (version == 1 && is.readUnsignedByte() != Protocol.P_LIST) { throw Messages.log.invalidResponse();
try (BlockingInvocation.Response response = invocation.getResponse()) { try (MessageInputStream is = response.getInputStream()) { if (is.readUnsignedByte() != Protocol.M_RESP_XA_RECOVER) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
final int parameterType = is.readUnsignedByte(); if (parameterType == Protocol.P_CONTEXT) { return new RelativeFederatingContext(new FastHashtable<>(context.getEnvironment()), context, NamingUtils.toCompositeName(name));
if (is.readUnsignedByte() != Protocol.M_RESP_XA_PREPARE) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
if (is.readUnsignedByte() != Protocol.M_RESP_XA_RB_ONLY) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
if (is.readUnsignedByte() != Protocol.M_RESP_XA_BEFORE) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
if (is.readUnsignedByte() != Protocol.M_RESP_XA_FORGET) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
if (is.readUnsignedByte() != Protocol.M_RESP_XA_COMMIT) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
if (is.readUnsignedByte() != Protocol.M_RESP_XA_ROLLBACK) { throw Log.log.unknownResponseXa(XAException.XAER_RMERR);
final int invId = message.readUnsignedShort(); try { final int id = message.readUnsignedByte(); switch (id) { case M_CAPABILITY: {
public int readUnsignedByte() throws IOException { return delegate.readUnsignedByte(); }
public void handleMessage(final Channel channel, final MessageInputStream message) { try { final int messageId = message.readUnsignedByte(); final int id = readId(message, version); final int result = message.readUnsignedByte(); if (result == Protocol.SUCCESS || result == Protocol.FAILURE) { tracker.signalResponse(id, messageId, message, true); } else { throw Messages.log.outcomeNotUnderstood(); } channel.receiveMessage(this); } catch (IOException e) { safeClose(channel); safeClose(message); } } });