Package org.glassfish.grizzly
Class CloseReason
- java.lang.Object
-
- org.glassfish.grizzly.CloseReason
-
public class CloseReason extends Object
An object, describing the reason whyConnectionwas closed.- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description static CloseReasonLOCALLY_CLOSED_REASONstatic CloseReasonREMOTELY_CLOSED_REASON
-
Constructor Summary
Constructors Constructor Description CloseReason(CloseType type, IOException cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOExceptiongetCause()Returns information about an error, that caused theConnectionto be closed.CloseTypegetType()Return information whetherConnectionwas closed locally or remotely.StringtoString()Returns also type and cause.
-
-
-
Field Detail
-
LOCALLY_CLOSED_REASON
public static final CloseReason LOCALLY_CLOSED_REASON
-
REMOTELY_CLOSED_REASON
public static final CloseReason REMOTELY_CLOSED_REASON
-
-
Constructor Detail
-
CloseReason
public CloseReason(CloseType type, IOException cause)
-
-
Method Detail
-
getType
public CloseType getType()
Return information whetherConnectionwas closed locally or remotely.- Returns:
- information whether
Connectionwas closed locally or remotely
-
getCause
public IOException getCause()
Returns information about an error, that caused theConnectionto be closed. If the cause wasn't specified by user and it was closed locally thenLOCALLY_CLOSEDwill be returned. If the cause wasn't specified by user and it was closed remotely thenREMOTELY_CLOSEDwill be returned.- Returns:
- information about an error, that caused the
Connectionto be closed
-
-