Package org.jgrapes.io.events
Class Closed<T>
java.lang.Object
org.jgrapes.core.internal.EventBase<T>
org.jgrapes.core.Event<T>
org.jgrapes.io.events.Closed<T>
- Type Parameters:
T
- Result type. UsuallyVoid
, but certain kinds of I/O channels have additional information associated with their closing.
- All Implemented Interfaces:
Future<T>
,Associator
,Eligible
- Direct Known Subclasses:
ProcessExited
This event signals that an I/O subchannel will no longer be used.
Components that have allocated resources for that channel should release them in response to receiving this event.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields inherited from class org.jgrapes.core.internal.EventBase
completed, completionEvents, invokedFor
-
Constructor Summary
ConstructorDescriptionClosed()
Creates a new event that signals a regular close.Creates a new event that signals a close in response to an error (usually anIOException
. -
Method Summary
Methods inherited from class org.jgrapes.core.Event
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieTo, toString
Methods inherited from class org.jgrapes.core.internal.EventBase
disableTracking, enqueued, firstResultAssigned, isTracked, onCompletion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGet
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
Closed
Creates a new event that signals a close in response to an error (usually anIOException
.- Parameters:
error
- the error
-
Closed
public Closed()Creates a new event that signals a regular close.
-
-
Method Details
-
error
Returns the cause of theClosed
event in case of error.- Returns:
- the optional failure
-