class ServerInfoServiceImpl implements ServerInfoService, Diagnostic {

    @Override
    public Map<DiagnosticAttribute, DiagnosticCallback> getDiagnosticData() {
        return new DiagnosticAttributeBuilder()
                .addDiagnosticAttribute(DiagnosticAttributeBuilder.VERSION, new DiagnosticCallback<String>() {
                    @Override
                    public String getDiagnosticAttributeValue() {
                        return getServerInfo().getVersion();
                    }
                })
                .addDiagnosticAttribute(DiagnosticAttributeBuilder.SOURCE_EDITION, new DiagnosticCallback<String>() {
                    @Override
                    public String getDiagnosticAttributeValue() {
                        return getServerInfo().getEdition().toString();
                    }
                })
                .addDiagnosticAttribute(DiagnosticAttributeBuilder.BUILD, new DiagnosticCallback<String>() {
                    @Override
                    public String getDiagnosticAttributeValue() {
                        return getServerInfo().getBuild();
                }
            }).build();
    }

}