|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.logger.AbstractErrorUpdateHandler com.atlassian.bamboo.logger.DefaultErrorHandler
public class DefaultErrorHandler
This class keeps track of Bamboo build errors so they can get reported to the user.
Field Summary | |
---|---|
static int |
BUILD_ERROR_LIMIT
|
Constructor Summary | |
---|---|
DefaultErrorHandler()
|
Method Summary | |
---|---|
void |
clear()
Remove all errors from the handler |
void |
createElasticError(java.lang.String context,
java.lang.Long agentId,
ThrowableDetails throwableDetails,
java.lang.String instanceId)
Create an error regarding Elastic Bamboo. |
void |
createError(java.lang.String planKey,
java.lang.Integer buildNumber,
java.lang.Long agentId,
java.lang.String context,
ThrowableDetails throwableDetails)
|
java.util.Collection<ErrorDetails> |
getAllErrors()
Get all the errors recorded against all builds |
java.util.Collection<ErrorDetails> |
getElasticErrors()
Get all the errors recorded against elastic bamboo |
ErrorDetails |
getErrorDetails(java.lang.String buildKey,
int errorNumber)
Obtain the specifed error from the handler. |
java.util.Collection<ErrorDetails> |
getErrors(PlanKey planKey)
Obtain all the errors recorded against a specific plan |
java.util.Collection<ErrorDetails> |
getErrors(PlanResultKey planResultKey)
Obtain all the errors recorded against a specific result |
java.util.Collection<ErrorDetails> |
getErrors(java.lang.String buildKey)
Deprecated. since 3.0 |
void |
removeBuildErrors(java.lang.String buildKey)
Remove all the errors for a given build |
void |
removeError(java.lang.String buildKey,
int errorNumber)
Remove a specific error from the handler. |
void |
setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
void |
setLocalAgentManager(LocalAgentManager localAgentManager)
|
void |
setMaxQueueSize(int queueSize)
|
void |
setPlanManager(PlanManager planManager)
|
Methods inherited from class com.atlassian.bamboo.logger.AbstractErrorUpdateHandler |
---|
addErrorCollection, getCurrentAgentId, recordElasticError, recordError, recordError, recordError, recordError, recordError, recordError, recordError, recordError, setAgentContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.logger.ErrorUpdateHandler |
---|
addErrorCollection, recordElasticError, recordError, recordError, recordError, recordError, recordError, recordError, recordError, recordError |
Field Detail |
---|
public static final int BUILD_ERROR_LIMIT
Constructor Detail |
---|
public DefaultErrorHandler()
Method Detail |
---|
public void createElasticError(java.lang.String context, @Nullable java.lang.Long agentId, @Nullable ThrowableDetails throwableDetails, @Nullable java.lang.String instanceId)
ErrorUpdateHandler
createElasticError
in interface ErrorUpdateHandler
public void createError(@Nullable java.lang.String planKey, java.lang.Integer buildNumber, java.lang.Long agentId, java.lang.String context, ThrowableDetails throwableDetails)
createError
in interface ErrorUpdateHandler
@Deprecated public java.util.Collection<ErrorDetails> getErrors(java.lang.String buildKey)
ErrorHandler
getErrors
in interface ErrorHandler
buildKey
- The build
ErrorDetails
@NotNull public java.util.Collection<ErrorDetails> getErrors(@NotNull PlanResultKey planResultKey)
ErrorAccessor
getErrors
in interface ErrorAccessor
ErrorDetails
@NotNull public java.util.Collection<ErrorDetails> getErrors(@NotNull PlanKey planKey)
ErrorAccessor
getErrors
in interface ErrorAccessor
ErrorDetails
@NotNull public java.util.Collection<ErrorDetails> getAllErrors()
ErrorAccessor
getAllErrors
in interface ErrorAccessor
ErrorDetails
@NotNull public java.util.Collection<ErrorDetails> getElasticErrors()
ErrorAccessor
getElasticErrors
in interface ErrorAccessor
ErrorDetails
public void clear()
ErrorHandler
clear
in interface ErrorHandler
public void setMaxQueueSize(int queueSize)
public void removeError(java.lang.String buildKey, int errorNumber)
ErrorHandler
removeError
in interface ErrorHandler
buildKey
- The build containing the errorerrorNumber
- The errorIndex'th error to be associated with the buildpublic ErrorDetails getErrorDetails(java.lang.String buildKey, int errorNumber)
ErrorHandler
getErrorDetails
in interface ErrorHandler
buildKey
- The build containing the error.errorNumber
- The errorIndex'th error to be associated with the build
public void removeBuildErrors(java.lang.String buildKey)
ErrorHandler
removeBuildErrors
in interface ErrorHandler
buildKey
- The key of the buildpublic void setPlanManager(PlanManager planManager)
public void setLocalAgentManager(LocalAgentManager localAgentManager)
public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
public void setEventManager(com.atlassian.event.EventManager eventManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |