com.github.fedorchuck.developers_notification.integrations
Interface Integration

All Known Implementing Classes:
SlackImpl, TelegramImpl

public interface Integration

Decelerate which methods should contain each integration, which allows to send messages to messengers.

Author: Volodymyr Fedorchuk

Since:
0.1.0

Method Summary
 void analyseResponse(HttpResponse response)
          Analyse response after sent message
 Task generateMessage(java.lang.String projectName, java.lang.String description, java.lang.Throwable throwable)
          Generate Task to send by specified params
 Task generateMessageFromLoggingEvent(java.lang.String projectName, org.apache.log4j.spi.LoggingEvent event)
          Generate Task to send by specified params
 DevelopersNotificationMessenger name()
          Contains name of integration
 void sendMessage(Task message)
          Provides sending messages to specified messenger
 

Method Detail

name

DevelopersNotificationMessenger name()
Contains name of integration

Returns:
name of integration
Since:
0.3.0

sendMessage

void sendMessage(Task message)
Provides sending messages to specified messenger

Parameters:
message - to send
Since:
0.1.0

generateMessage

Task generateMessage(java.lang.String projectName,
                     java.lang.String description,
                     java.lang.Throwable throwable)
Generate Task to send by specified params

Parameters:
projectName - where was method called. Can be null
description - about situation. Can be null
throwable - which happened. Can be null
Returns:
generated message as Task JSON
Since:
0.1.0

generateMessageFromLoggingEvent

Task generateMessageFromLoggingEvent(java.lang.String projectName,
                                     org.apache.log4j.spi.LoggingEvent event)
Generate Task to send by specified params

Parameters:
projectName - where was method called. Can be null
event - from logger
Returns:
generated message as Task JSON
Since:
0.3.0

analyseResponse

void analyseResponse(HttpResponse response)
Analyse response after sent message

Parameters:
response - response from http client
Since:
0.2.1