HubError

public class HubError

JSON element for Hub Error when there is an exception in rest call.

Constructors

HubError

public HubError()

Creates a new instance of HubError setting the timestamp to now, and the hostname to the one of this instance.

Methods

getApplication

public String getApplication()

Gets the name of the application that caused the error.

Returns:the name of the application that caused the error

getErrorCode

public String getErrorCode()

Gets the code of this error.

Returns:the code of this error

getErrorMessage

public String getErrorMessage()

Gets a message describing the error.

Returns:a message describing the error

getHostName

public String getHostName()

Gets hostname of the server on which this error occurred.

Returns:the hostname of the server

getTimeStamp

public Date getTimeStamp()

Gets timestamp of this error.

Returns:the timestamp of this error

setApplication

public void setApplication(String application)

Sets the name of the application that caused the error.

Parameters:
  • application – the name of the application that caused the error

setErrorCode

public void setErrorCode(String errorCode)

Sets the code of this error for this HubError instance.

Parameters:
  • errorCode – the code to be set

setErrorMessage

public void setErrorMessage(String errorMessage)

Sets a message describing the error for this HubError instance.

Parameters:
  • errorMessage

setHostName

public void setHostName(String hostName)

Sets hostname of the server on which this error occurred for this HubError instance.

Parameters:
  • hostName – host name to be set

setTimeStamp

public void setTimeStamp(Date timeStamp)

Sets timestamp of this error.

Parameters:
  • timeStamp – timestamp to be set