Code example for TooManyListenersException

0
 
    public void setImportEventListener( ImportEventListener listener )
	throws TooManyListenersException 
    { 
	if ( _listener != null )
	    throw new TooManyListenersException( Messages.message( "dsml.onlyOneListener" ) );
	_listener = listener;
    } 
 
 
    public ImportEventListener getImportEventListener() 
    { 
	return _listener;
    } 
 
 
    public void importDocument( InputStream stream )
	throws ImportExportException 
    { 
	importDocument( _xmlContext.getParser(), new InputSource( stream ) );
    }