Package org.jgrapes.io.events
Class Input<T extends Buffer>
- Type Parameters:
T- the type of data used in this event
- All Implemented Interfaces:
Future<Void>,Associator,Eligible
This event signals that a new chunk of data has successfully been obtained
from some source.
This type of event is commonly used for data flowing into the application.
-
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 -
Method Summary
Modifier and TypeMethodDescriptionfromSink(ManagedBuffer<B> buffer, boolean endOfRecord) Create a new event with the given buffer.fromSource(ManagedBuffer<B> buffer, boolean endOfRecord) Create a new event with the given buffer.Methods inherited from class org.jgrapes.io.events.IOEvent
buffer, data, handled, hasRemaining, isEndOfRecord, remaining, toStringMethods inherited from class org.jgrapes.core.Event
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieToMethods inherited from class org.jgrapes.core.internal.EventBase
disableTracking, enqueued, firstResultAssigned, isTracked, onCompletionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGetMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Method Details
-
fromSource
Create a new event with the given buffer.The buffer must have been prepared for invoking
get-methods.- Parameters:
buffer- the buffer with the dataendOfRecord- if the event ends a data record
-
fromSink
Create a new event with the given buffer.Creating the event flips the buffer, which is assumed to have been used for collecting data up to now.
- Parameters:
buffer- the buffer with the dataendOfRecord- if the event ends a data record
-