public interface HookService
Modifier and Type | Method and Description |
---|---|
<T> T |
doWithHookRequest(int repositoryId,
Function<HookRequestHandle,T> callback)
Perform an operation with a hook request
|
HookRequestHandle |
registerRequest(int repositoryId)
Register a hosting request with the hook service.
|
@Nonnull HookRequestHandle registerRequest(int repositoryId)
HookRequestHandle.close()
when the request is complete.
It is suggested for implementers to use doWithHookRequest(int, java.util.function.Function)
if possible as this will clean up the request for the calleerepositoryId
- the id of the repository the hosting request is for@Nullable <T> T doWithHookRequest(int repositoryId, @Nonnull Function<HookRequestHandle,T> callback)
T
- the return type of the callbackrepositoryId
- the id of the repository the hosting request is forcallback
- a callback which will handle the operationCopyright © 2020 Atlassian. All rights reserved.