Package java.util

Examples of java.util.TooManyListenersException


            void verifyRequestor(Object requestor, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException {
                BeanContextServiceRevokedListener cbcsrl = (BeanContextServiceRevokedListener)requestors.get(requestor);

                if (cbcsrl != null && !cbcsrl.equals(bcsrl))
                    throw new TooManyListenersException();
            }
View Full Code Here


        if (dsl == null) return;

        if (equals(dsl)) throw new IllegalArgumentException("DragSourceContext may not be its own listener");

        if (listener != null)
            throw new TooManyListenersException();
        else
            listener = dsl;
    }
View Full Code Here

     * <code>DragGestureListener</code> has already been added.
     */

    public synchronized void addDragGestureListener(DragGestureListener dgl) throws TooManyListenersException {
        if (dragGestureListener != null)
            throw new TooManyListenersException();
        else {
            dragGestureListener = dgl;

            if (component != null) registerListeners();
        }
View Full Code Here

        if (equals(dtl)) throw new IllegalArgumentException("DropTarget may not be its own Listener");

        if (dtListener == null)
            dtListener = dtl;
        else
            throw new TooManyListenersException();
    }
View Full Code Here

     * listener.
     */
    synchronized public void addListener(Object listener) throws TooManyListenersException
    {
        if (_listener != null)
             throw new TooManyListenersException("Callback listener is already registered");
        _listener = 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

                getRequestors().put(requestor, csr);
                return;
            }

            if (bcsrl != null && !bcsrl.equals(csr.getListener())) {
                throw new TooManyListenersException();
            }
            csr.incrementRefCount();
        }
View Full Code Here

     * listener.
     */
    synchronized public void addListener(Object listener) throws TooManyListenersException
    {
        if (_listener != null)
             throw new TooManyListenersException("Callback listener is already registered");
        _listener = listener;
    }
View Full Code Here

            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 (sipStack.isLoggingEnabled(LogLevels.TRACE_DEBUG))
            sipStack.getStackLogger().logDebug("add SipListener " + sipListener);
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.