Package com.launchdarkly.eventsource
Class FaultEvent
- java.lang.Object
-
- com.launchdarkly.eventsource.FaultEvent
-
- All Implemented Interfaces:
StreamEvent
public final class FaultEvent extends java.lang.Object implements StreamEvent
Describes a failure in the stream.When an error occurs, if the configured
ErrorStrategy
returnsErrorStrategy.Action.CONTINUE
,EventSource.readAnyEvent()
andEventSource.anyEvents()
will return a FaultEvent. Otherwise, the error would instead be thrown as aStreamException
.If you receive a FaultEvent, the EventSource is now in an inactive state since either a connection attempt has failed or an existing connection has been closed. EventSource will attempt to reconnect if you either call
EventSource.start()
or simply continue reading events after this point.- Since:
- 4.0.0
- See Also:
StartedEvent
-
-
Constructor Summary
Constructors Constructor Description FaultEvent(StreamException cause)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
StreamException
getCause()
Returns aStreamException
describing the cause of the failure.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
FaultEvent
public FaultEvent(StreamException cause)
Creates an instance.- Parameters:
cause
- the cause of the failure
-
-
Method Detail
-
getCause
public StreamException getCause()
Returns aStreamException
describing the cause of the failure.- Returns:
- the cause of the failure
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-