Package javax.sip

Examples of javax.sip.ObjectInUseException


    // JvB: API doc is not clear, but in_use ==
    // sipProviderImpl.sipListener!=null
    // so we should throw if app did not call removeSipListener
    // sipProviderImpl.sipListener = null;
    if (sipProviderImpl.getSipListener() != null) {
      throw new ObjectInUseException(
          "SipProvider still has an associated SipListener!");
    }

    sipProviderImpl.removeListeningPoints();
View Full Code Here


            throw new NullPointerException("null listeningPoint");
        if (this.getLogWriter().isLoggingEnabled())
            this.getLogWriter().logDebug("createSipProvider: " + listeningPoint);
        ListeningPointImpl listeningPointImpl = (ListeningPointImpl) listeningPoint;
        if (listeningPointImpl.sipProvider != null)
            throw new ObjectInUseException("Provider already attached!");

        SipProviderImpl provider = new SipProviderImpl(this);

        provider.setListeningPoint(listeningPointImpl);
        listeningPointImpl.sipProvider = provider;
View Full Code Here

        // JvB: API doc is not clear, but in_use ==
        // sipProviderImpl.sipListener!=null
        // so we should throw if app did not call removeSipListener
        // sipProviderImpl.sipListener = null;
        if (sipProviderImpl.sipListener != null) {
            throw new ObjectInUseException("SipProvider still has an associated SipListener!");
        }

        sipProviderImpl.removeListeningPoints();

        // Bug reported by Rafael Barriuso
View Full Code Here

   */
  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

   */
  public synchronized void removeListeningPoint(ListeningPoint listeningPoint)
      throws ObjectInUseException {
    ListeningPointImpl lp = (ListeningPointImpl) listeningPoint;
    if (lp.messageProcessor.inUse())
      throw new ObjectInUseException("Object is in use");
    this.listeningPoints.remove(lp.getTransport().toUpperCase());

  }
View Full Code Here

     */
    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

     */
    public synchronized void removeListeningPoint(ListeningPoint listeningPoint)
            throws ObjectInUseException {
        ListeningPointImpl lp = (ListeningPointImpl) listeningPoint;
        if (lp.messageProcessor.inUse())
            throw new ObjectInUseException("Object is in use");
        this.listeningPoints.remove(lp.getTransport().toUpperCase());

    }
View Full Code Here

    if (logger.isLoggingEnabled(LogLevels.TRACE_DEBUG))
      this.logger.logDebug(
          "createSipProvider: " + listeningPoint);
    ListeningPointImpl listeningPointImpl = (ListeningPointImpl) listeningPoint;
    if (listeningPointImpl.sipProvider != null)
      throw new ObjectInUseException("Provider already attached!");

    SipProviderImpl provider = new SipProviderImpl(this);

    provider.setListeningPoint(listeningPointImpl);
    listeningPointImpl.sipProvider = provider;
View Full Code Here

    // JvB: API doc is not clear, but in_use ==
    // sipProviderImpl.sipListener!=null
    // so we should throw if app did not call removeSipListener
    // sipProviderImpl.sipListener = null;
    if (sipProviderImpl.getSipListener() != null) {
      throw new ObjectInUseException(
          "SipProvider still has an associated SipListener!");
    }

    sipProviderImpl.removeListeningPoints();
View Full Code Here

    if (this.isLoggingEnabled())
      this.getStackLogger().logDebug(
          "createSipProvider: " + listeningPoint);
    ListeningPointImpl listeningPointImpl = (ListeningPointImpl) listeningPoint;
    if (listeningPointImpl.sipProvider != null)
      throw new ObjectInUseException("Provider already attached!");

    SipProviderImpl provider = new SipProviderImpl(this);

    provider.setListeningPoint(listeningPointImpl);
    listeningPointImpl.sipProvider = provider;
View Full Code Here

TOP

Related Classes of javax.sip.ObjectInUseException

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.