Package com.launchdarkly.eventsource
A client implementation for the
Server-Sent
Events (SSE) protocol.
The entry point for using this package is EventSource
.
-
Interface Summary Interface Description HttpConnectStrategy.ClientConfigurer An interface for use withHttpConnectStrategy.clientBuilderActions(ClientConfigurer)
.HttpConnectStrategy.RequestTransformer An interface for use withHttpConnectStrategy.requestTransformer(RequestTransformer)
.StreamEvent A marker interface for all types of stream information that can be returned byEventSource.readAnyEvent()
andEventSource.messages()
. -
Class Summary Class Description CommentEvent Describes a comment line received from the stream.ConnectStrategy An abstraction of howEventSource
should obtain an input stream.ConnectStrategy.Client An object provided byConnectStrategy
that is retained by a singleEventSource
instance to perform all connection attempts by that instance.ConnectStrategy.Client.Result The return type ofConnectStrategy.Client.connect(String)
.DefaultRetryDelayStrategy Default implementation of the retry delay strategy, providing exponential backoff and jitter.ErrorStrategy An abstraction of how to determine whether a stream failure should be thrown to the caller as an exception, or treated as an event.ErrorStrategy.Result The return type ofErrorStrategy.apply(StreamException)
.EventSource The SSE client.EventSource.Builder Builder for configuringEventSource
.FaultEvent Describes a failure in the stream.HttpConnectStrategy Allows configuration of HTTP request behavior forEventSource
.MessageEvent Information about a message received from the stream.ModernTLSSocketFactory AnSSLSocketFactory
that tries to ensure modern TLS versions are used.RetryDelayStrategy RetryDelayStrategy is an abstraction of how EventSource should determine the delay between retry attempts when a stream fails.RetryDelayStrategy.Result The return type ofRetryDelayStrategy.apply(long)
.StartedEvent Represents the beginning of a stream. -
Enum Summary Enum Description ErrorStrategy.Action Describes the possible actions EventSource could take after an error.ReadyState Enum values that can be returned byEventSource.getState()
. -
Exception Summary Exception Description StreamClosedByCallerException An exception indicating that the stream stopped because you explicitly stopped it.StreamClosedByServerException An exception indicating that the stream stopped because the server closed the connection.StreamClosedWithIncompleteMessageException StreamException Base class for all exceptions thrown byEventSource
.StreamHttpErrorException An exception indicating that the remote server returned an HTTP error.StreamIOException An exception indicating that a connection could not be made, or that an existing connection failed with a network error.