Search in sources :

Example 1 with DefaultMessage

use of com.navercorp.pinpoint.io.request.DefaultMessage 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 DefaultMessage

use of com.navercorp.pinpoint.io.request.DefaultMessage in project pinpoint by naver.

the class MetadataService method newMessage.

private <T> Message<T> newMessage(T requestData, short type) {
    final Header header = new HeaderV2(Header.SIGNATURE, HeaderV2.VERSION, type);
    final HeaderEntity headerEntity = new HeaderEntity(Collections.emptyMap());
    return new DefaultMessage<>(header, headerEntity, requestData);
}
Also used : HeaderEntity(com.navercorp.pinpoint.io.header.HeaderEntity) DefaultMessage(com.navercorp.pinpoint.io.request.DefaultMessage) Header(com.navercorp.pinpoint.io.header.Header) HeaderV2(com.navercorp.pinpoint.io.header.v2.HeaderV2)

Example 3 with DefaultMessage

use of com.navercorp.pinpoint.io.request.DefaultMessage in project pinpoint by naver.

the class StatService method newMessage.

private <T> Message<T> newMessage(T requestData, short serviceType) {
    final Header header = new HeaderV2(Header.SIGNATURE, HeaderV2.VERSION, serviceType);
    final HeaderEntity headerEntity = new HeaderEntity(new HashMap<>());
    return new DefaultMessage<>(header, headerEntity, requestData);
}
Also used : HeaderEntity(com.navercorp.pinpoint.io.header.HeaderEntity) DefaultMessage(com.navercorp.pinpoint.io.request.DefaultMessage) Header(com.navercorp.pinpoint.io.header.Header) HeaderV2(com.navercorp.pinpoint.io.header.v2.HeaderV2)

Example 4 with DefaultMessage

use of com.navercorp.pinpoint.io.request.DefaultMessage in project pinpoint by naver.

the class SpanService method newMessage.

private <T> Message<T> newMessage(T requestData, short serviceType) {
    final Header header = new HeaderV2(Header.SIGNATURE, HeaderV2.VERSION, serviceType);
    final HeaderEntity headerEntity = new HeaderEntity(new HashMap<>());
    return new DefaultMessage<>(header, headerEntity, requestData);
}
Also used : HeaderEntity(com.navercorp.pinpoint.io.header.HeaderEntity) DefaultMessage(com.navercorp.pinpoint.io.request.DefaultMessage) Header(com.navercorp.pinpoint.io.header.Header) HeaderV2(com.navercorp.pinpoint.io.header.v2.HeaderV2)

Example 5 with DefaultMessage

use of com.navercorp.pinpoint.io.request.DefaultMessage in project pinpoint by naver.

the class AgentService method newMessage.

private <T> Message<T> newMessage(T requestData, short type) {
    final Header header = new HeaderV2(Header.SIGNATURE, HeaderV2.VERSION, type);
    final HeaderEntity headerEntity = new HeaderEntity(Collections.emptyMap());
    return new DefaultMessage<T>(header, headerEntity, requestData);
}
Also used : HeaderEntity(com.navercorp.pinpoint.io.header.HeaderEntity) DefaultMessage(com.navercorp.pinpoint.io.request.DefaultMessage) Header(com.navercorp.pinpoint.io.header.Header) HeaderV2(com.navercorp.pinpoint.io.header.v2.HeaderV2)

Aggregations

DefaultMessage (com.navercorp.pinpoint.io.request.DefaultMessage)7 Header (com.navercorp.pinpoint.io.header.Header)5 HeaderEntity (com.navercorp.pinpoint.io.header.HeaderEntity)5 HeaderV2 (com.navercorp.pinpoint.io.header.v2.HeaderV2)4 ResponseEvent (com.navercorp.pinpoint.collector.cluster.route.ResponseEvent)2 AgentEventBo (com.navercorp.pinpoint.common.server.bo.event.AgentEventBo)2 HeaderV1 (com.navercorp.pinpoint.io.header.v1.HeaderV1)2 TCommandTransfer (com.navercorp.pinpoint.thrift.dto.command.TCommandTransfer)2 TCommandTransferResponse (com.navercorp.pinpoint.thrift.dto.command.TCommandTransferResponse)2 HeaderTBaseDeserializer (com.navercorp.pinpoint.thrift.io.HeaderTBaseDeserializer)2 TBase (org.apache.thrift.TBase)2 Test (org.junit.Test)2 AgentEventType (com.navercorp.pinpoint.common.server.util.AgentEventType)1 ByteArrayHeaderReader (com.navercorp.pinpoint.io.header.ByteArrayHeaderReader)1 HeaderReader (com.navercorp.pinpoint.io.header.HeaderReader)1 TCommandEcho (com.navercorp.pinpoint.thrift.dto.command.TCommandEcho)1 TCommandThreadDumpResponse (com.navercorp.pinpoint.thrift.dto.command.TCommandThreadDumpResponse)1 TException (org.apache.thrift.TException)1