public Object deserialize(AgentEventType agentEventType, byte[] eventBody) throws UnsupportedEncodingException {
        Objects.requireNonNull(agentEventType, "agentEventType");

        Class<?> eventMessageType = agentEventType.getMessageType();
        if (eventMessageType == Void.class) {
            return null;
        }

        if (DeadlockBo.class.isAssignableFrom(eventMessageType)) {
            return deserializeDeadlockBo(eventBody);
        } else if (String.class.isAssignableFrom(eventMessageType)) {
            return BytesUtils.toString(eventBody);
        }
        throw new UnsupportedEncodingException("Unsupported event message type [" + eventMessageType.getName() + "]");
    }
@author jaehong.kim
AgentEventBo.version is 1
commons-server/src/main/java/com/navercorp/pinpoint/common/server/util/AgentEventMessageDeserializerV1.java