@Test public void testRemoveListener() throws Exception { EntryReadListener listener = mock(EntryReadListener.class); PirasoEntryReader reader = new PirasoEntryReader(new ByteArrayInputStream("".getBytes())); reader.addListener(listener); assertEquals(1, reader.getListeners().size()); reader.removeListener(listener); assertTrue(reader.getListeners().isEmpty()); reader.addListener(listener); assertEquals(1, reader.getListeners().size()); reader.clearListeners(); assertTrue(reader.getListeners().isEmpty()); }
public void removeListener(EntryReadListener listener) { listeners.remove(listener); }
PirasoEntryReader extends DefaultHandler { public void removeListener(EntryReadListener listener) { listeners.remove(listener); } }
PirasoEntryReader extends DefaultHandler { public void removeListener(EntryReadListener listener) { listeners.remove(listener); } PirasoEntryReader(InputStream in); }
PirasoEntryReader extends DefaultHandler { public void removeListener(EntryReadListener listener) { listeners.remove(listener); } PirasoEntryReader(InputStream in); void start(); void stop(); @Override @SuppressWarnings("unchecked") void endElement(String uri, String localName, String qName); @Override void startElement(String uri, String localName, String qName, Attributes attributes); @Override void characters(char[] ch, int start, int length); String getId(); String getWatchedAddr(); void fireEntryReadStartedEvent(EntryReadEvent evt); void fireEntryReadEvent(EntryReadEvent evt); List<EntryReadListener> getListeners(); void addListener(EntryReadListener listener); void removeListener(EntryReadListener listener); void clearListeners(); }
PirasoEntryReader extends DefaultHandler { public void removeListener(EntryReadListener listener) { listeners.remove(listener); } PirasoEntryReader(InputStream in); void start(); void stop(); @Override @SuppressWarnings("unchecked") void endElement(String uri, String localName, String qName); @Override void startElement(String uri, String localName, String qName, Attributes attributes); @Override void characters(char[] ch, int start, int length); String getId(); String getWatchedAddr(); void fireEntryReadStartedEvent(EntryReadEvent evt); void fireEntryReadEvent(EntryReadEvent evt); List<EntryReadListener> getListeners(); void addListener(EntryReadListener listener); void removeListener(EntryReadListener listener); void clearListeners();  }