本文整理了Java中javax.mail.Store.getSession()
方法的一些代码示例,展示了Store.getSession()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.getSession()
方法的具体详情如下:
包路径:javax.mail.Store
类名称:Store
方法名:getSession
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.4_spec
/**
* Constructor initializing folder and message msgnum; intended to be used by implementations of Folder.
*
* @param folder the folder that contains the message
* @param msgnum the message index within the folder
*/
protected Message(Folder folder, int msgnum) {
this.folder = folder;
this.msgnum = msgnum;
// make sure we copy the session information from the folder.
this.session = folder.getStore().getSession();
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec
/**
* Constructor initializing folder and message msgnum; intended to be used by implementations of Folder.
*
* @param folder the folder that contains the message
* @param msgnum the message index within the folder
*/
protected Message(Folder folder, int msgnum) {
this.folder = folder;
this.msgnum = msgnum;
// make sure we copy the session information from the folder.
this.session = folder.getStore().getSession();
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: com.sun.mail/mailapi
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Constructor that takes a Store object.
*
* @param store the Store that holds this folder
*/
protected Folder(Store store) {
this.store = store;
// create or choose the appropriate event queue
Session session = store.getSession();
String scope =
session.getProperties().getProperty("mail.event.scope", "folder");
Executor executor =
(Executor)session.getProperties().get("mail.event.executor");
if (scope.equalsIgnoreCase("application"))
q = EventQueue.getApplicationEventQueue(executor);
else if (scope.equalsIgnoreCase("session"))
q = session.getEventQueue();
else if (scope.equalsIgnoreCase("store"))
q = store.getEventQueue();
else // if (scope.equalsIgnoreCase("folder"))
q = new EventQueue(executor);
}
内容来源于网络,如有侵权,请联系作者删除!