Package javax.mail

Examples of javax.mail.MethodNotSupportedException


  public void close(boolean expunge) throws MessagingException {
        synchronized (this) {
            if (!isOpen()) throw new IllegalStateException("Already closed.");
            if (ROOT.equals(getName())) {
                throw new MethodNotSupportedException("close");
            }
            try {
                if (expunge && mode == READ_WRITE) {
                    List<ExchangeMessage> deletedMessages =
                            new ArrayList<ExchangeMessage>();
View Full Code Here


  public boolean create(int type) throws MessagingException {
        return false;
  }

  public boolean delete(boolean recurse) throws MessagingException {
        throw new MethodNotSupportedException("delete");
  }
View Full Code Here

                DRAFT.equalsIgnoreCase(name) ||
                ROOT.equals(name);
  }

  public Message[] expunge() throws MessagingException {
        throw new MethodNotSupportedException("expunge");
  }
View Full Code Here

  public Message getMessage(int messageNumber) throws MessagingException {
        if (!isOpen()) throw new IllegalStateException("Folder is closed.");
        if (!exists()) throw new FolderNotFoundException(this);
        if (ROOT.equals(getName())) {
            throw new MethodNotSupportedException("getMessage");
        }
        synchronized (this) {
            int index = messageNumber - 1;
            ExchangeMessage message = cache.get(index);
            if (message == null) {
View Full Code Here

  public void open(int mode) throws MessagingException {
        if (isOpen()) throw new IllegalStateException("Folder is open.");
        if (!exists()) throw new FolderNotFoundException(this);
        if (ROOT.equals(getName())) {
            throw new MethodNotSupportedException("open");
        }
        ExchangeStore store = (ExchangeStore) getStore();
        synchronized (this) {
            this.mode = mode;
            try {
View Full Code Here

        }
        notifyConnectionListeners(ConnectionEvent.OPENED);
  }

  public boolean renameTo(Folder target) throws MessagingException {
    throw new MethodNotSupportedException("renameTo");
  }
View Full Code Here

TOP

Related Classes of javax.mail.MethodNotSupportedException

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.