Package com.sun.star.lang

Examples of com.sun.star.lang.DisposedException


    }

    // This function must only be called while synchronized on this object:
    private synchronized void checkDisposed() {
        if (disposed) {
            throw new DisposedException("java_remote_bridge " + this
                                        + " is disposed");
        }
    }
View Full Code Here


                    }
                    _iThreadPool.putJob(
                        new Job(obj, java_remote_bridge.this, msg));
                }
            } catch (Throwable e) {
                dispose(new DisposedException(e.toString()));
            }
        }
View Full Code Here

        Property p = ((PropertyData) properties.get(propertyName)).property;
        Vector specificVeto = null;
        Vector unspecificVeto = null;
        synchronized (this) {
            if (disposed) {
                throw new DisposedException("disposed", object);
            }
            if ((p.Attributes & PropertyAttribute.CONSTRAINED) != 0) {
                Object o = vetoListeners.get(propertyName);
                if (o != null) {
                    specificVeto = (Vector) ((Vector) o).clone();
View Full Code Here

        else
            bVoidValue= value == null;
        if (bVoidValue && (prop.Attributes & PropertyAttribute.MAYBEVOID) == 0)
            throw new com.sun.star.lang.IllegalArgumentException("The property must have a value; the MAYBEVOID attribute is not set!");
        if (bInDispose || bDisposed)
            throw new DisposedException("Component is already disposed");
       
        //Check if the argument is allowed
        boolean bValueOk= false;
        if (value instanceof Any)
            bValueOk= checkType(((Any) value).getObject());
View Full Code Here

        else
            bVoidValue= value == null;
        if (bVoidValue && (prop.Attributes & PropertyAttribute.MAYBEVOID) == 0)
            throw new com.sun.star.lang.IllegalArgumentException("The property must have a value; the MAYBEVOID attribute is not set!");
        if (bInDispose || bDisposed)
            throw new DisposedException("Component is already disposed");
       
        //Check if the argument is allowed
        boolean bValueOk= false;
        if (value instanceof Any)
            bValueOk= checkType(((Any) value).getObject());
View Full Code Here

      boolean waited = false;
      while(_head == null && (waitTime == 0 || !waited)) {
        if(_doDispose == _disposeId) {
          _doDispose = null;
          throw (DisposedException)
                        new DisposedException().initCause(_throwable);
        }

        // notify sync queues
        notifyAll();

        try {
          // wait for new job
          wait(waitTime);
        }
        catch(InterruptedException interruptedException) {
            throw new com.sun.star.uno.RuntimeException(getClass().getName() + ".removeJob - unexpected:" + interruptedException);
        }
       
        // signal that we have already waited once
        waited = true;
      }


      if(_head != null) {
        Job current = _head;
        _head    = _head._next;
       
        if(_head == null)
          _tail = null;
       
        job = current;
        _active = true;
      }
    }

    // always wait for asynchron jobqueue to be finished !
    if(job != null && _async_jobQueue != null) {
      synchronized(_async_jobQueue) {
        // wait for async queue to be empty and last job to be done
        while(_async_jobQueue._active || _async_jobQueue._head != null) {
          if(DEBUG) System.err.println("waiting for async:" + _async_jobQueue._head + " " +  _async_jobQueue._worker_thread);

          if(_doDispose == _disposeId) {
            _doDispose = null;
            throw (DisposedException)
                            new DisposedException().initCause(_throwable);
          }

          try {
            _async_jobQueue.wait();
          }
View Full Code Here

TOP

Related Classes of com.sun.star.lang.DisposedException

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.