Package dd2480.group4.net
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)
-
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 interfaceNotificationInterface
- Parameters:
pushEvent
- The information of the repository name, owner name and hashid where the message gets sentstatus
- 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.
-