public class CloseReason extends Object
Connection was closed.| Modifier and Type | Field and Description |
|---|---|
static CloseReason |
LOCALLY_CLOSED_REASON |
static CloseReason |
REMOTELY_CLOSED_REASON |
| Constructor and Description |
|---|
CloseReason(CloseType type,
IOException cause) |
| Modifier and Type | Method and Description |
|---|---|
IOException |
getCause()
Returns information about an error, that caused the
Connection to be closed. |
CloseType |
getType()
Return information whether
Connection was closed locally or remotely. |
String |
toString()
Returns also type and cause.
|
public static final CloseReason LOCALLY_CLOSED_REASON
public static final CloseReason REMOTELY_CLOSED_REASON
public CloseReason(CloseType type, IOException cause)
public CloseType getType()
Connection was closed locally or remotely.Connection was closed locally or remotelypublic IOException getCause()
Connection to be closed.
If the cause wasn't specified by user and it was closed locally then LOCALLY_CLOSED will be returned. If the
cause wasn't specified by user and it was closed remotely then REMOTELY_CLOSED will be returned.Connection to be closedCopyright © 2017–2020 Oracle Corporation. All rights reserved.