public class ConnectException extends ServiceException
| Constructor and Description |
|---|
ConnectException(String message,
String uri,
SecurityMode securityMode)
Create a new exception with a message text.
|
ConnectException(String message,
String uri,
SecurityMode securityMode,
ServiceResultException cause)
Create a new exception with a message text and reference to the original exception.
|
ConnectException(String message,
String uri,
SecurityMode securityMode,
StatusCode statusCode)
Create a new exception with a message text and a specific StatusCode (instead of the default
StatusCodes.Bad_ConnectionRejected. |
ConnectException(String message,
String uri,
SecurityMode securityMode,
UnsignedInteger statusCode)
Create a new exception with a message text and a specific StatusCode (instead of the default
StatusCodes.Bad_ConnectionRejected. |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
formatMessage(String message,
String uri,
SecurityMode securityMode) |
String |
getUri()
Returns the uri related to the connection error, typically meaning the uri for which connection
was attempted.
|
getDiagnosticInfo, getServiceResult, toStringaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceprotected final String uri
public ConnectException(String message, String uri, SecurityMode securityMode)
This will create a new exception with StatusCodes set to
StatusCodes.Bad_ConnectionRejected.
message - Exception messageuri - The URI to which the connection was tried.securityMode - The requested security modepublic ConnectException(String message, String uri, SecurityMode securityMode, ServiceResultException cause)
message - Exception messageuri - The URI to which the connection was tried.securityMode - The requested security modecause - The original service result exception.public ConnectException(String message, String uri, SecurityMode securityMode, StatusCode statusCode)
StatusCodes.Bad_ConnectionRejected.message - Exception messageuri - The URI to which the connection was tried.securityMode - The requested security modestatusCode - The original statusCode to use for the exceptionpublic ConnectException(String message, String uri, SecurityMode securityMode, UnsignedInteger statusCode)
StatusCodes.Bad_ConnectionRejected.message - Exception messageuri - The URI to which the connection was tried.securityMode - The requested security modestatusCode - The original statusCode to use for the exceptionprotected static String formatMessage(String message, String uri, SecurityMode securityMode)
public String getUri()
Copyright © 2026. All rights reserved.