Search in sources :

Example 1 with HeaderReader

use of com.navercorp.pinpoint.io.header.HeaderReader in project pinpoint by naver.

the class ChunkHeaderTBaseDeserializer method readInternal.

private Message<TBase<?, ?>> readInternal() throws TException {
    final HeaderReader reader = newHeaderReader();
    final Header header = readHeader(reader);
    final HeaderEntity headerEntity = readHeaderEntity(reader, header);
    skipHeaderOffset(reader);
    final TBase<?, ?> base = locator.bodyLookup(header.getType());
    if (base == null) {
        throw new TException("base must not be null type:" + header.getType());
    }
    base.read(protocol);
    return new DefaultMessage<TBase<?, ?>>(header, headerEntity, base);
}
Also used : HeaderEntity(com.navercorp.pinpoint.io.header.HeaderEntity) TException(org.apache.thrift.TException) DefaultMessage(com.navercorp.pinpoint.io.request.DefaultMessage) Header(com.navercorp.pinpoint.io.header.Header) ByteArrayHeaderReader(com.navercorp.pinpoint.io.header.ByteArrayHeaderReader) HeaderReader(com.navercorp.pinpoint.io.header.HeaderReader)

Example 2 with HeaderReader

use of com.navercorp.pinpoint.io.header.HeaderReader in project pinpoint by naver.

the class ChunkHeaderTBaseDeserializer method readHeader.

private Header readHeader() throws TException {
    HeaderReader reader = newHeaderReader();
    Header header = readHeader(reader);
    skipHeaderOffset(reader);
    return header;
}
Also used : Header(com.navercorp.pinpoint.io.header.Header) ByteArrayHeaderReader(com.navercorp.pinpoint.io.header.ByteArrayHeaderReader) HeaderReader(com.navercorp.pinpoint.io.header.HeaderReader)

Aggregations

ByteArrayHeaderReader (com.navercorp.pinpoint.io.header.ByteArrayHeaderReader)2 Header (com.navercorp.pinpoint.io.header.Header)2 HeaderReader (com.navercorp.pinpoint.io.header.HeaderReader)2 HeaderEntity (com.navercorp.pinpoint.io.header.HeaderEntity)1 DefaultMessage (com.navercorp.pinpoint.io.request.DefaultMessage)1 TException (org.apache.thrift.TException)1