Examples of ObjectInUseException


Examples of javax.sip.ObjectInUseException

     */
    public synchronized void addListeningPoint(ListeningPoint listeningPoint)
            throws ObjectInUseException {
        ListeningPointImpl lp = (ListeningPointImpl) listeningPoint;
        if (lp.sipProvider != null && lp.sipProvider != this)
            throw new ObjectInUseException(
                    "Listening point assigned to another provider");
        String transport = lp.getTransport().toUpperCase();
        if (this.listeningPoints.isEmpty()) {
            // first one -- record the IP address/port of the LP

            this.address = listeningPoint.getIPAddress();
            this.port = listeningPoint.getPort();
        } else {
            if ((!this.address.equals(listeningPoint.getIPAddress()))
                    || this.port != listeningPoint.getPort())
                throw new ObjectInUseException(
                        "Provider already has different IP Address associated");

        }
        if (this.listeningPoints.containsKey(transport)
                && this.listeningPoints.get(transport) != listeningPoint)
            throw new ObjectInUseException(
                    "Listening point already assigned for transport!");

        // This is for backwards compatibility.
        lp.sipProvider = this;

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.