Package org.jboss.resteasy.plugins.providers.sse.client

## Class SseEventSourceImpl

- java.lang.Object
- - org.jboss.resteasy.plugins.providers.sse.client.SseEventSourceImpl

- All Implemented Interfaces:
    `AutoCloseable`, `javax.ws.rs.sse.SseEventSource`

      public class SseEventSourceImpl
      extends Object
      implements javax.ws.rs.sse.SseEventSource

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `SseEventSourceImpl.SourceBuilder` |

    - ### Nested classes/interfaces inherited from interface javax.ws.rs.sse.SseEventSource

      `javax.ws.rs.sse.SseEventSource.Builder`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static long` | `RECONNECT_DEFAULT` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SseEventSourceImpl​(javax.ws.rs.client.WebTarget target)` |
    `SseEventSourceImpl​(javax.ws.rs.client.WebTarget target, boolean open)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `close​(long timeout, TimeUnit unit)` |
    `boolean` | `isOpen()` |
    `void` | `open()` |
    `void` | `open​(String lastEventId)` |
    `void` | `open​(String lastEventId, String verb, javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.MediaType... mediaTypes)` |
    `void` | `register​(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent)` |
    `void` | `register​(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent, Consumer<Throwable> onError)` |
    `void` | `register​(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent, Consumer<Throwable> onError, Runnable onComplete)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.ws.rs.sse.SseEventSource

      `close`

- - ### Field Detail

    - #### RECONNECT_DEFAULT

          public static final long RECONNECT_DEFAULT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SseEventSourceImpl

          public SseEventSourceImpl​(javax.ws.rs.client.WebTarget target)

    - #### SseEventSourceImpl

          public SseEventSourceImpl​(javax.ws.rs.client.WebTarget target,
                                    boolean open)

  - ### Method Detail

    - #### open

          public void open()

      Specified by:
        `open` in interface `javax.ws.rs.sse.SseEventSource`

    - #### open

          public void open​(String lastEventId)

    - #### open

          public void open​(String lastEventId,
                           String verb,
                           javax.ws.rs.client.Entity<?> entity,
                           javax.ws.rs.core.MediaType... mediaTypes)

    - #### isOpen

          public boolean isOpen()

      Specified by:
        `isOpen` in interface `javax.ws.rs.sse.SseEventSource`

    - #### register

          public void register​(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent)

      Specified by:
        `register` in interface `javax.ws.rs.sse.SseEventSource`

    - #### register

          public void register​(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent,
                               Consumer<Throwable> onError)

      Specified by:
        `register` in interface `javax.ws.rs.sse.SseEventSource`

    - #### register

          public void register​(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent,
                               Consumer<Throwable> onError,
                               Runnable onComplete)

      Specified by:
        `register` in interface `javax.ws.rs.sse.SseEventSource`

    - #### close

          public boolean close​(long timeout,
                               TimeUnit unit)

      Specified by:
        `close` in interface `javax.ws.rs.sse.SseEventSource`