Class StashDiagnostics
java.lang.Object
com.atlassian.bamboo.plugins.stash.StashDiagnostics
A helper class for Stash application links diagnostics.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A simple POJO containing information about an event and the date it was received. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Optional<StashDiagnostics.LastReceivedEventInfo>
getLastReceivedEventInfo
(@NotNull com.atlassian.applinks.api.ApplicationId applicationId) Returns information about last received Stash event for the specified application link.static void
recordEvent
(@NotNull com.atlassian.event.remote.RemoteEvent event) Records an event received from Stash - stores it as the last received for the application it was sent by.
-
Constructor Details
-
StashDiagnostics
public StashDiagnostics()
-
-
Method Details
-
recordEvent
public static void recordEvent(@NotNull @NotNull com.atlassian.event.remote.RemoteEvent event) Records an event received from Stash - stores it as the last received for the application it was sent by.- Parameters:
event
- Stash event
-
getLastReceivedEventInfo
@NotNull public static @NotNull Optional<StashDiagnostics.LastReceivedEventInfo> getLastReceivedEventInfo(@NotNull @NotNull com.atlassian.applinks.api.ApplicationId applicationId) Returns information about last received Stash event for the specified application link. If there was no event recorded for the application,Optional.empty()
will be returned.- Parameters:
applicationId
- Stash application link id- Returns:
- Information about last received Stash event
-