-
- All Implemented Interfaces:
public class EventSource.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private DurationretryTimeDefaultprivate DurationeventTimeoutDefaultprivate DurationeventTimeoutCheckIntervalDefaultprivate DurationhttpReadTimeoutDefaultpublic final static EventSource.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final DurationgetRetryTimeDefault()final UnitsetRetryTimeDefault(Duration retryTimeDefault)final DurationgetEventTimeoutDefault()Global default time interval for event timeout. final UnitsetEventTimeoutDefault(Duration eventTimeoutDefault)Global default time interval for event timeout. final DurationgetEventTimeoutCheckIntervalDefault()Global default time interval for event timeout checks. final UnitsetEventTimeoutCheckIntervalDefault(Duration eventTimeoutCheckIntervalDefault)Global default time interval for event timeout checks. final DurationgetHttpReadTimeoutDefault()Global default read timeout for EventSource http clients. final UnitsetHttpReadTimeoutDefault(Duration httpReadTimeoutDefault)Global default read timeout for EventSource http clients. -
-
Method Detail
-
getRetryTimeDefault
final Duration getRetryTimeDefault()
Global default time interval for connection retries.
-
setRetryTimeDefault
final Unit setRetryTimeDefault(Duration retryTimeDefault)
Global default time interval for connection retries.
-
getEventTimeoutDefault
final Duration getEventTimeoutDefault()
Global default time interval for event timeout.
If an event is not received within the specified timeout the connection is forcibly restarted. If set to null, the default will be that event timeouts are disabled.
Each EventSource can override this setting in its constructor using the
eventTimeoutconstructor parameter.
-
setEventTimeoutDefault
final Unit setEventTimeoutDefault(Duration eventTimeoutDefault)
Global default time interval for event timeout.
If an event is not received within the specified timeout the connection is forcibly restarted. If set to null, the default will be that event timeouts are disabled.
Each EventSource can override this setting in its constructor using the
eventTimeoutconstructor parameter.
-
getEventTimeoutCheckIntervalDefault
final Duration getEventTimeoutCheckIntervalDefault()
Global default time interval for event timeout checks.
This setting controls the frequency that the event timeout is checked.
Each EventSource can override this setting in its constructor using the
eventTimeoutCheckInterval.
-
setEventTimeoutCheckIntervalDefault
final Unit setEventTimeoutCheckIntervalDefault(Duration eventTimeoutCheckIntervalDefault)
Global default time interval for event timeout checks.
This setting controls the frequency that the event timeout is checked.
Each EventSource can override this setting in its constructor using the
eventTimeoutCheckInterval.
-
getHttpReadTimeoutDefault
final Duration getHttpReadTimeoutDefault()
Global default read timeout for EventSource http clients.
If data is not received without the read timeout, a cancellation error will cause a reconnection attempt to be initiated.
Note: EventSources can override the HTTP read timeout by customizing the
httpClientconstructor parameters. This default applies to instances that use a system create client.
-
setHttpReadTimeoutDefault
final Unit setHttpReadTimeoutDefault(Duration httpReadTimeoutDefault)
Global default read timeout for EventSource http clients.
If data is not received without the read timeout, a cancellation error will cause a reconnection attempt to be initiated.
Note: EventSources can override the HTTP read timeout by customizing the
httpClientconstructor parameters. This default applies to instances that use a system create client.
-
-
-
-