@Test public void testReadFrom() throws Exception { channelBuffer = ChannelBuffers.copiedBuffer(tlv); adjacencyStateTlv.readFrom(channelBuffer); assertThat(adjacencyStateTlv.adjacencyType(), is((byte) 0)); }
@Override public void readFrom(ChannelBuffer channelBuffer) { this.setAdjacencyType(channelBuffer.readByte()); this.setLocalCircuitId(channelBuffer.readInt()); if (channelBuffer.readableBytes() > 0) { byte[] tempByteArray = new byte[IsisUtil.ID_SIX_BYTES]; channelBuffer.readBytes(tempByteArray, 0, IsisUtil.ID_SIX_BYTES); this.setNeighborSystemId(IsisUtil.systemId(tempByteArray)); this.setNeighborLocalCircuitId(channelBuffer.readInt()); } }
AdjacencyStateTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { this.setAdjacencyType(channelBuffer.readByte()); this.setLocalCircuitId(channelBuffer.readInt()); if (channelBuffer.readableBytes() > 0) { byte[] tempByteArray = new byte[IsisUtil.ID_SIX_BYTES]; channelBuffer.readBytes(tempByteArray, 0, IsisUtil.ID_SIX_BYTES); this.setNeighborSystemId(IsisUtil.systemId(tempByteArray)); this.setNeighborLocalCircuitId(channelBuffer.readInt()); } } }
AdjacencyStateTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { this.setAdjacencyType(channelBuffer.readByte()); this.setLocalCircuitId(channelBuffer.readInt()); if (channelBuffer.readableBytes() > 0) { byte[] tempByteArray = new byte[IsisUtil.ID_SIX_BYTES]; channelBuffer.readBytes(tempByteArray, 0, IsisUtil.ID_SIX_BYTES); this.setNeighborSystemId(IsisUtil.systemId(tempByteArray)); this.setNeighborLocalCircuitId(channelBuffer.readInt()); } } AdjacencyStateTlv(TlvHeader tlvHeader); }
AdjacencyStateTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { this.setAdjacencyType(channelBuffer.readByte()); this.setLocalCircuitId(channelBuffer.readInt()); if (channelBuffer.readableBytes() > 0) { byte[] tempByteArray = new byte[IsisUtil.ID_SIX_BYTES]; channelBuffer.readBytes(tempByteArray, 0, IsisUtil.ID_SIX_BYTES); this.setNeighborSystemId(IsisUtil.systemId(tempByteArray)); this.setNeighborLocalCircuitId(channelBuffer.readInt()); } } AdjacencyStateTlv(TlvHeader tlvHeader); int localCircuitId(); void setLocalCircuitId(int localCircuitId); String neighborSystemId(); void setNeighborSystemId(String neighborSystemId); int neighborLocalCircuitId(); void setNeighborLocalCircuitId(int neighborLocalCircuitId); byte adjacencyType(); void setAdjacencyType(byte adjacencyType); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); @Override String toString(); }
AdjacencyStateTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { this.setAdjacencyType(channelBuffer.readByte()); this.setLocalCircuitId(channelBuffer.readInt()); if (channelBuffer.readableBytes() > 0) { byte[] tempByteArray = new byte[IsisUtil.ID_SIX_BYTES]; channelBuffer.readBytes(tempByteArray, 0, IsisUtil.ID_SIX_BYTES); this.setNeighborSystemId(IsisUtil.systemId(tempByteArray)); this.setNeighborLocalCircuitId(channelBuffer.readInt()); } } AdjacencyStateTlv(TlvHeader tlvHeader); int localCircuitId(); void setLocalCircuitId(int localCircuitId); String neighborSystemId(); void setNeighborSystemId(String neighborSystemId); int neighborLocalCircuitId(); void setNeighborLocalCircuitId(int neighborLocalCircuitId); byte adjacencyType(); void setAdjacencyType(byte adjacencyType); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); @Override String toString();  }