Package java.util

Examples of java.util.TooManyListenersException


            throws TooManyListenersException {

        if (sipStack.sipListener == null) {
            sipStack.sipListener = sipListener;
        } else if (sipStack.sipListener != sipListener) {
            throw new TooManyListenersException(
                    "Stack already has a listener. Only one listener per stack allowed");
        }

        if (logger.isLoggingEnabled(LogLevels.TRACE_DEBUG))
            logger.logDebug("add SipListener " + sipListener);
View Full Code Here


     * @throws TooManyListenersException if there is more than one listener
     */
    public void addLineNumberListener(LineNumberListener listener,
            int lineNoLimit) throws TooManyListenersException {
        if (this.listener != null)
            throw new TooManyListenersException();
        if (lineNoLimit < 2)
            throw new IllegalArgumentException(
                    "LineNoLimit cannot be less than 2");

        this.listener = listener;
View Full Code Here

    if (debug)
      z.reportln( "RXTXPort:addEventListener()");
    if( SPEventListener != null )
    {
      throw new TooManyListenersException();
    }
    SPEventListener = lsnr;
    if( !MonitorThreadAlive )
    {
      MonitorThreadLock = true;
View Full Code Here

    public void setImportEventListener( ImportEventListener listener )
  throws TooManyListenersException
    {
  if ( _listener != null )
      throw new TooManyListenersException( Messages.message( "dsml.onlyOneListener" ) );
  _listener = listener;
    }
View Full Code Here

     * @throws TooManyListenersException
     */
    public void addCLAIMListener(ClaimMessageListener listener)
            throws TooManyListenersException {
        if (claimListener != null) {
            throw new TooManyListenersException();
        }
        claimListener = listener;
    }
View Full Code Here

     * MMLリスナを追加する。
     * @param listener MMLリスナリスナ
     */
    public void addMMLListner(MmlMessageListener listener) throws TooManyListenersException {
        if (mmlListener != null) {
            throw new TooManyListenersException();
        }
        mmlListener = listener;
    }
View Full Code Here

   * @tests java.util.TooManyListenersException#TooManyListenersException()
   */
  public void test_Constructor() {
    // Test for method java.util.TooManyListenersException()
    try {
      throw new TooManyListenersException();
    } catch (TooManyListenersException e) {
      assertNull(
          "Message thrown with exception constructed with no message",
          e.getMessage());
    }
View Full Code Here

   * @tests java.util.TooManyListenersException#TooManyListenersException(java.lang.String)
   */
  public void test_ConstructorLjava_lang_String() {
    // Test for method java.util.TooManyListenersException(java.lang.String)
    try {
      throw new TooManyListenersException("Gah");
    } catch (TooManyListenersException e) {
      assertEquals("Incorrect message thrown with exception", "Gah", e
          .getMessage());
    }
  }
View Full Code Here

            // awt.181=Attempt to register context as its listener.
            throw new IllegalArgumentException(Messages.getString("awt.181")); //$NON-NLS-1$
        }
        if (listener != null) {
            // awt.173=One listener is already exist.
            throw new TooManyListenersException(Messages.getString("awt.173")); //$NON-NLS-1$
        }

        listener = dsl;
    }
View Full Code Here

        if (dtl == this) {
            // awt.176=DropTarget cannot be added as listener to itself
            throw new IllegalArgumentException(Messages.getString("awt.176")); //$NON-NLS-1$
        }
        if (dropTargetListener != null) {
            throw new TooManyListenersException();
        }
        dropTargetListener = dtl;
    }
View Full Code Here

TOP

Related Classes of java.util.TooManyListenersException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.