List of usage examples for javax.mail Store getURLName
public URLName getURLName()
From source file:de.saly.elasticsearch.imap.AbstractIMAPRiverUnitTest.java
protected void checkStoreForTestConnection(final Store store) { if (!store.isConnected()) { IMAPUtils.close(store);/*from w ww .j ava2 s. c o m*/ throw new RuntimeException("Store not connected"); } if (!store.getURLName().getUsername().toLowerCase().startsWith("es_imapriver_unittest")) { IMAPUtils.close(store); throw new RuntimeException( "User " + store.getURLName().getUsername() + " belongs not to a valid test mail connection"); } }
From source file:org.apache.jmeter.protocol.mail.sampler.MailFileFolder.java
public MailFileFolder(Store store, String path) { super(store); String base = store.getURLName().getHost(); // == ServerName from mail sampler File parentFolder = new File(base); isFile = parentFolder.isFile();/*from ww w.j a v a2 s. c om*/ if (isFile) { folderPath = new File(base); } else { folderPath = new File(base, path); } }