public void connect(String eventSourceUrl) throws IOException {
  LOG.entering(CLASS_NAME,"connect",eventSourceUrl);
  if (stream != null) {
    LOG.warning("Reusing the same event source for a differnt URL, please create a new EventSource object");
    throw new IllegalArgumentException("Reusing the same event source for a differnt URL, please create a new EventSource object");
  }
  stream=new SseEventStream(eventSourceUrl);
  stream.setListener(eventStreamListener);
  stream.connect();
}

public void connect ( String eventSourceUrl ) throws IOException { LOG . entering ( CLASS_NAME , "connect" , eventSourceUrl ) ; if ( stream != null ) { LOG . warning ( "Reusing the same event source for a differnt URL, please create a new EventSource object" ) ; throw new IllegalArgumentException ( "Reusing the same event source for a differnt URL, please create a new EventSource object" ) ; } stream = new SseEventStream ( eventSourceUrl ) ; stream . setListener ( eventStreamListener ) ; stream . connect ( ) ; }
connects the eventsource instance to the stream location .
