javax.mail.MethodNotSupportedException Java Examples

The following examples show how to use javax.mail.MethodNotSupportedException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmailReader.java    From baleen with Apache License 2.0 5 votes vote down vote up
private void tryExpunge() throws MessagingException {
  try {
    inboxFolder.expunge();
  } catch (MethodNotSupportedException mnse) {
    getMonitor()
        .debug(
            "Expunge method not supported (e.g. POP3) - closing and reopening folder - {}",
            mnse.getMessage());

    inboxFolder.close(true);
    reopenConnection();
  }
}
 
Example #2
Source File: DefaultFolder.java    From FairEmail with GNU General Public License v3.0 4 votes vote down vote up
@Override
   public boolean delete(boolean recurse) throws MessagingException {  
// Not applicable on DefaultFolder
throw new MethodNotSupportedException("Cannot delete Default Folder");
   }
 
Example #3
Source File: DefaultFolder.java    From FairEmail with GNU General Public License v3.0 4 votes vote down vote up
@Override
   public boolean renameTo(Folder f) throws MessagingException {
// Not applicable on DefaultFolder
throw new MethodNotSupportedException("Cannot rename Default Folder");
   }
 
Example #4
Source File: DefaultFolder.java    From FairEmail with GNU General Public License v3.0 4 votes vote down vote up
@Override
   public void appendMessages(Message[] msgs) throws MessagingException {
// Not applicable on DefaultFolder
throw new MethodNotSupportedException("Cannot append to Default Folder");
   }
 
Example #5
Source File: DefaultFolder.java    From FairEmail with GNU General Public License v3.0 4 votes vote down vote up
@Override
   public Message[] expunge() throws MessagingException {
// Not applicable on DefaultFolder
throw new MethodNotSupportedException("Cannot expunge Default Folder");
   }
 
Example #6
Source File: LocalServiceInvoker.java    From Mycat-openEP with Apache License 2.0 4 votes vote down vote up
public static <I,R,P> R invokeLocal(I i,Method method,P param) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, MethodNotSupportedException{
	if(param==null){
		return (R)method.invoke(i);
	}
	return (R)method.invoke(i,param);
}
 
Example #7
Source File: LocalServiceInvoker.java    From Mycat-openEP with Apache License 2.0 4 votes vote down vote up
public static <I,R,P> R invokeLocal(I i,Method method,P param) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, MethodNotSupportedException{
	if(param==null){
		return (R)method.invoke(i);
	}
	return (R)method.invoke(i,param);
}
 
Example #8
Source File: POP3MockFolder.java    From javamail-mock2 with Apache License 2.0 4 votes vote down vote up
@Override
public InputStream listCommand() throws MessagingException, IOException {
    throw new MethodNotSupportedException();
}