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); inboxFolder.close(true); reopenConnection(); } }
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); }
@Override public InputStream listCommand() throws MessagingException, IOException { throw new MethodNotSupportedException(); }