Package org.glassfish.grizzly
Class CloseReason
- java.lang.Object
-
- org.glassfish.grizzly.CloseReason
-
public class CloseReason extends Object
An object, describing the reason whyConnection
was closed.- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description static CloseReason
LOCALLY_CLOSED_REASON
static CloseReason
REMOTELY_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 IOException
getCause()
Returns information about an error, that caused theConnection
to be closed.CloseType
getType()
Return information whetherConnection
was closed locally or remotely.String
toString()
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 whetherConnection
was closed locally or remotely.- Returns:
- information whether
Connection
was closed locally or remotely
-
getCause
public IOException getCause()
Returns information about an error, that caused theConnection
to be closed. If the cause wasn't specified by user and it was closed locally thenLOCALLY_CLOSED
will be returned. If the cause wasn't specified by user and it was closed remotely thenREMOTELY_CLOSED
will be returned.- Returns:
- information about an error, that caused the
Connection
to be closed
-
-