@Override public void decodeRest(final HornetQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = HornetQExceptionType.createException(code, msg); }
@Override public void decodeRest(final HornetQBuffer buffer) { error = buffer.readBoolean(); responseCode = buffer.readInt(); message = buffer.readNullableString(); }
@Override public void decodeRest(final HornetQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = new HornetQException(code, msg); }
@Override public void decodeRest(final HornetQBuffer buffer) { error = buffer.readBoolean(); responseCode = buffer.readInt(); message = buffer.readNullableString(); }
@Override public void decodeRest(final HornetQBuffer buffer) { name = buffer.readString(); sessionChannelID = buffer.readLong(); version = buffer.readInt(); username = buffer.readNullableString(); password = buffer.readNullableString(); minLargeMessageSize = buffer.readInt(); xa = buffer.readBoolean(); autoCommitSends = buffer.readBoolean(); autoCommitAcks = buffer.readBoolean(); windowSize = buffer.readInt(); preAcknowledge = buffer.readBoolean(); defaultAddress = buffer.readNullableString(); }
@Override public void decodeRest(final HornetQBuffer buffer) { name = buffer.readString(); sessionChannelID = buffer.readLong(); version = buffer.readInt(); username = buffer.readNullableString(); password = buffer.readNullableString(); minLargeMessageSize = buffer.readInt(); xa = buffer.readBoolean(); autoCommitSends = buffer.readBoolean(); autoCommitAcks = buffer.readBoolean(); windowSize = buffer.readInt(); preAcknowledge = buffer.readBoolean(); defaultAddress = buffer.readNullableString(); }
public float readFloat() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.FLOAT: return Float.intBitsToFloat(getBuffer().readInt()); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Float.parseFloat(s); default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
public double readDouble() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.FLOAT: return Float.intBitsToFloat(getBuffer().readInt()); case DataConstants.DOUBLE: return Double.longBitsToDouble(getBuffer().readLong()); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Double.parseDouble(s); default: throw new MessageFormatException("Invalid conversion: " + type); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
return String.valueOf(Double.longBitsToDouble(getBuffer().readLong())); case DataConstants.STRING: return getBuffer().readNullableString(); default: throw new MessageFormatException("Invalid conversion");
public boolean readBoolean() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.BOOLEAN: return getBuffer().readBoolean(); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Boolean.valueOf(s); default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
public short readShort() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.BYTE: return getBuffer().readByte(); case DataConstants.SHORT: return getBuffer().readShort(); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Short.parseShort(s); default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
public char readChar() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.CHAR: return (char)getBuffer().readShort(); case DataConstants.STRING: String str = getBuffer().readNullableString(); if (str == null) { throw new NullPointerException("Invalid conversion"); } else { throw new MessageFormatException("Invalid conversion"); } default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
@Override public void decodeRest(final HornetQBuffer buffer) { this.nodeID = buffer.readString(); this.nodeName = buffer.readNullableString(); this.backup = buffer.readBoolean(); this.currentEventID = buffer.readLong(); if (buffer.readBoolean()) { connector = new TransportConfiguration(); connector.decode(buffer); } if (buffer.readBoolean()) { backupConnector = new TransportConfiguration(); backupConnector.decode(buffer); } }
public int readInt() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.BYTE: return getBuffer().readByte(); case DataConstants.SHORT: return getBuffer().readShort(); case DataConstants.INT: return getBuffer().readInt(); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Integer.parseInt(s); default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
public byte readByte() throws JMSException { checkRead(); int index = getBuffer().readerIndex(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.BYTE: return getBuffer().readByte(); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Byte.parseByte(s); default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } catch (NumberFormatException e) { getBuffer().readerIndex(index); throw e; } }
public long readLong() throws JMSException { checkRead(); try { byte type = getBuffer().readByte(); switch (type) { case DataConstants.BYTE: return getBuffer().readByte(); case DataConstants.SHORT: return getBuffer().readShort(); case DataConstants.INT: return getBuffer().readInt(); case DataConstants.LONG: return getBuffer().readLong(); case DataConstants.STRING: String s = getBuffer().readNullableString(); return Long.parseLong(s); default: throw new MessageFormatException("Invalid conversion"); } } catch (IndexOutOfBoundsException e) { throw new MessageEOFException(""); } }
nodeName = buffer.readNullableString();
return Double.longBitsToDouble(getBuffer().readLong()); case DataConstants.STRING: return getBuffer().readNullableString(); case DataConstants.BYTES: int len = getBuffer().readInt();