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 (sipStack.isLoggingEnabled())
            sipStack.getStackLogger().logDebug("add SipListener " + sipListener);
View Full Code Here


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

                if (cbcsrl != null && !cbcsrl.equals(bcsrl))
                    throw new TooManyListenersException();

                requestors.put(requestor, bcsrl);
            }
View Full Code Here

            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

        if (dgl == null) {
            return;
        }
        if (dragGestureListener != null) {
            // awt.173=One listener is already exist.
            throw new TooManyListenersException(Messages.getString("awt.173")); //$NON-NLS-1$
        }

        dragGestureListener = dgl;
        registerListeners();
    }
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

            // 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 (listeners == null) {
            listeners = new Vector<SampleListener>();
        }

        if (listeners.size() >= 100) {
            throw new TooManyListenersException(
                    "Number of listeners could not exceed 100");
        }
        listeners.add(listener);
    }
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.