Class Notification

java.lang.Object
dd2480.group4.net.Notification
All Implemented Interfaces:
NotificationInterface

public class Notification
extends java.lang.Object
implements NotificationInterface
A class for notifying the end user of the status of a build run by setting the commit status on the upstream repository
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  Notification.Status  
  • Constructor Summary

    Constructors 
    Constructor Description
    Notification​(HttpInterface httpinterface)  
  • Method Summary

    Modifier and Type Method Description
    java.net.HttpURLConnection setStatus​(PushEvent pushEvent, Notification.Status status, java.lang.String statusMessage)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setStatus

      public java.net.HttpURLConnection setStatus​(PushEvent pushEvent, Notification.Status status, java.lang.String statusMessage) throws java.io.IOException
      Specified by:
      setStatus in interface NotificationInterface
      Parameters:
      pushEvent - The information of the repository name, owner name and hashid where the message gets sent
      status - The status sent.
      statusMessage - The message accompanying the status.
      Returns:
      The Http-connection with the given URL where status and message is sent.
      Throws:
      java.io.IOException - if it fails to send the message.