Package com.yahoo.search.result
Class EventStream
java.lang.Object
com.yahoo.component.provider.FreezableClass
com.yahoo.component.provider.ListenableFreezableClass
com.yahoo.search.result.Hit
com.yahoo.search.result.EventStream
- All Implemented Interfaces:
com.yahoo.component.provider.Freezable,com.yahoo.component.provider.ListenableFreezable,com.yahoo.processing.response.Data,com.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>,Cloneable,Comparable<Hit>
public class EventStream
extends Hit
implements com.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
A stream of events which can be rendered as Server-Sent Events (SSE).
- Author:
- lesters
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class com.yahoo.search.result.Hit
Hit.RawUtf8Consumer -
Field Summary
FieldsFields inherited from class com.yahoo.search.result.Hit
RANKFEATURES_FIELD, SDDOCNAME_FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.yahoo.processing.response.Dataadd(com.yahoo.processing.response.Data event) voidvoidvoidaddDataListener(Runnable runnable) List<com.yahoo.processing.response.Data>asList()voidclose()Releases the resources held by this, making it irreversibly unusableCompletableFuture<com.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>>voiderror(String source, ErrorMessage message) com.yahoo.processing.response.Dataget(int index) com.yahoo.processing.response.IncomingData<com.yahoo.processing.response.Data>incoming()voidMethods inherited from class com.yahoo.search.result.Hit
assignId, buildHitField, clearFields, clone, compareTo, equals, features, fieldIterator, fieldKeys, fields, forEachField, forEachFieldAsRaw, getDisplayId, getField, getFilled, getId, getQuery, getRelevance, getSearcherSpecificMetaData, getSource, hasField, hasFields, hashCode, isAuxiliary, isCached, isFillable, isFilled, isMeta, removeField, request, reserve, setAuxiliary, setCached, setField, setFillable, setFilled, setId, setId, setMeta, setQuery, setRelevance, setRelevance, setSearcherSpecificMetaData, setSource, toString, typesMethods inherited from class com.yahoo.component.provider.ListenableFreezableClass
addFreezeListener, freezeMethods inherited from class com.yahoo.component.provider.FreezableClass
ensureNotFrozen, isFrozenMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.yahoo.processing.response.Data
requestMethods inherited from interface com.yahoo.component.provider.Freezable
freeze, isFrozenMethods inherited from interface com.yahoo.component.provider.ListenableFreezable
addFreezeListener
-
Field Details
-
EVENT_TYPE_TOKEN
- See Also:
-
DEFAULT_EVENT_TYPE
- See Also:
-
-
Constructor Details
-
EventStream
public EventStream()
-
-
Method Details
-
add
-
add
-
error
-
markComplete
public void markComplete() -
add
public com.yahoo.processing.response.Data add(com.yahoo.processing.response.Data event) - Specified by:
addin interfacecom.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
-
get
public com.yahoo.processing.response.Data get(int index) - Specified by:
getin interfacecom.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
-
asList
- Specified by:
asListin interfacecom.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
-
incoming
public com.yahoo.processing.response.IncomingData<com.yahoo.processing.response.Data> incoming()- Specified by:
incomingin interfacecom.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
-
completeFuture
public CompletableFuture<com.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>> completeFuture()- Specified by:
completeFuturein interfacecom.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
-
addDataListener
- Specified by:
addDataListenerin interfacecom.yahoo.processing.response.DataList<com.yahoo.processing.response.Data>
-
close
public void close()Description copied from class:HitReleases the resources held by this, making it irreversibly unusable
-