Class SimpleServiceMessageParserCallback
- java.lang.Object
-
- jetbrains.buildServer.messages.serviceMessages.SimpleServiceMessageParserCallback
-
- All Implemented Interfaces:
ServiceMessageParserCallback
public class SimpleServiceMessageParserCallback extends Object implements ServiceMessageParserCallback
Very simple implementation of service messages parser callback. It collects all parsed service messages and errors.- Since:
- 2019.2
-
-
Constructor Summary
Constructors Constructor Description SimpleServiceMessageParserCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ParseException>getErrors()List<ServiceMessage>getMessages()voidparseException(ParseException parseException, String text)Called when text looked like service message but parser failed to create service message object from it for some reason.voidregularText(String text)Called for the regular text, i.e.voidserviceMessage(ServiceMessage message)Called for each parsed service message
-
-
-
Method Detail
-
regularText
public void regularText(@NotNull String text)Description copied from interface:ServiceMessageParserCallbackCalled for the regular text, i.e. for the text that does not contain service messages in it.- Specified by:
regularTextin interfaceServiceMessageParserCallback- Parameters:
text- test that does not contain service messages in it
-
serviceMessage
public void serviceMessage(@NotNull ServiceMessage message)Description copied from interface:ServiceMessageParserCallbackCalled for each parsed service message- Specified by:
serviceMessagein interfaceServiceMessageParserCallback- Parameters:
message- parsed service message
-
parseException
public void parseException(@NotNull ParseException parseException, @NotNull String text)Description copied from interface:ServiceMessageParserCallbackCalled when text looked like service message but parser failed to create service message object from it for some reason.- Specified by:
parseExceptionin interfaceServiceMessageParserCallback- Parameters:
parseException- exceptiontext- text that parser failed to parse
-
getMessages
@NotNull public List<ServiceMessage> getMessages()
-
getErrors
@NotNull public List<ParseException> getErrors()
-
-