package org.eclipse.scanning.api.event.core;

import java.util.Map;

import org.eclipse.scanning.api.event.EventException;

public interface ITopicConnection extends IURIConnection {
	
	/**
	 * The string topic to publish events on for this manager.
	 * The events will be beans which serialize to JSON.
	 * 
	 * @return
	 */
	public String getTopicName();
	
	/**
	 * Sets the scan topic, causing the connection to be made to that topic and throwing an
	 * exception if the connection cannot be made.
	 * @param topic
	 * @throws EventException
	 */
	public void setTopicName(String topic) throws EventException;

	
	/**
	 * Call to disconnect all publishers and subscribers when the connection goes down.
	 * @throws EventException
	 */
	public void disconnect() throws EventException;
 
}

@@ -43,31 +43,8 @@
 e;%0A%0A
-import java.util.Map;%0A%0A
 impo
@@ -614,19 +614,20 @@
 connect 
-all
+this
  publish
@@ -632,13 +632,11 @@
 sher
-s and
+ or
  sub
@@ -646,39 +646,47 @@
 iber
-s when the connection goes down
+. Typically used in a try-finally block
 .%0A%09 

Correct Java Doc on disconnect() method