Package com.tnsai.exceptions
Class TimeoutException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.exceptions.TnsAIException
com.tnsai.exceptions.TimeoutException
- All Implemented Interfaces:
Serializable
Exception for operation timeout errors.
Retryable, but with increasing delays.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTimeoutException(String message, long timeoutMs) TimeoutException(String operation, long timeoutMs, Throwable cause) TimeoutException(String message, Throwable cause, long timeoutMs) -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeoutExceptionactionTimeout(String actionName, long timeoutMs) Factory method for action execution timeout.intGets maximum recommended retry attempts.longGets suggested retry delay in milliseconds.longstatic TimeoutExceptionhttpTimeout(String url, long timeoutMs) Factory method for HTTP request timeout.static TimeoutExceptionllmTimeout(long timeoutMs) Factory method for LLM response timeout.Methods inherited from class com.tnsai.exceptions.TnsAIException
getContext, getErrorCode, getMessage, getThrownAt, isRetryable, wrapMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TimeoutException
-
TimeoutException
-
TimeoutException
-
-
Method Details
-
getTimeoutMs
public long getTimeoutMs() -
getOperation
-
getSuggestedRetryDelayMs
public long getSuggestedRetryDelayMs()Description copied from class:TnsAIExceptionGets suggested retry delay in milliseconds. Override in subclasses for specific retry strategies.- Overrides:
getSuggestedRetryDelayMsin classTnsAIException
-
getMaxRetryAttempts
public int getMaxRetryAttempts()Description copied from class:TnsAIExceptionGets maximum recommended retry attempts.- Overrides:
getMaxRetryAttemptsin classTnsAIException
-
llmTimeout
Factory method for LLM response timeout. -
httpTimeout
Factory method for HTTP request timeout. -
actionTimeout
Factory method for action execution timeout.
-