本文整理了Java中com.sun.mail.imap.Utility.toMessageSetSorted()
方法的一些代码示例,展示了Utility.toMessageSetSorted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utility.toMessageSetSorted()
方法的具体详情如下:
包路径:com.sun.mail.imap.Utility
类名称:Utility
方法名:toMessageSetSorted
[英]Sort (a copy of) the given array of messages and then run thru the sorted array of messages, apply the given Condition on each message and generate sets of contiguous sequence-numbers for the successful messages. If a message in the given array is found to be expunged, it is ignored. ASSERT: Since this method uses and returns message sequence numbers, you should use this method only when holding the messageCacheLock.
[中]对给定的消息数组进行排序(副本),然后运行已排序的消息数组,对每条消息应用给定的条件,并为成功的消息生成连续的序列号集。如果发现给定数组中的消息被删除,则会忽略该消息。断言:由于此方法使用并返回消息序列号,因此仅当持有messageCacheLock时才应使用此方法。
代码示例来源:origin: camunda/camunda-bpm-platform
MessageSet[] msgsets = Utility.toMessageSetSorted(msgs, condition);
代码示例来源:origin: com.sun.mail/javax.mail
MessageSet[] msgsets = Utility.toMessageSetSorted(msgs, condition);
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Set the specified flags for the given array of messages.
*/
public synchronized void setFlags(Message[] msgs, Flags flag, boolean value)
throws MessagingException {
checkOpened();
checkFlags(flag); // validate flags
if (msgs.length == 0) // boundary condition
return;
synchronized(messageCacheLock) {
try {
IMAPProtocol p = getProtocol();
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
"Messages have been removed");
p.storeFlags(ms, flag, value);
} catch (ConnectionException cex) {
throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
throw new MessagingException(pex.getMessage(), pex);
}
}
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Set the specified flags for the given array of messages.
*/
@Override
public synchronized void setFlags(Message[] msgs, Flags flag, boolean value)
throws MessagingException {
checkOpened();
checkFlags(flag); // validate flags
if (msgs.length == 0) // boundary condition
return;
synchronized(messageCacheLock) {
try {
IMAPProtocol p = getProtocol();
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
"Messages have been removed");
p.storeFlags(ms, flag, value);
} catch (ConnectionException cex) {
throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
throw new MessagingException(pex.getMessage(), pex);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
代码示例来源:origin: com.sun.mail/javax.mail
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
代码示例来源:origin: com.sun.mail/android-mail
MessageSet[] msgsets = Utility.toMessageSetSorted(msgs, condition);
代码示例来源:origin: jboss/jboss-javaee-specs
MessageSet[] msgsets = Utility.toMessageSetSorted(msgs, condition);
代码示例来源:origin: com.sun.mail/jakarta.mail
MessageSet[] msgsets = Utility.toMessageSetSorted(msgs, condition);
代码示例来源:origin: org.glassfish.metro/webservices-extra
MessageSet[] msgsets = Utility.toMessageSetSorted(msgs, condition);
代码示例来源:origin: com.sun.mail/android-mail
/**
* Set the specified flags for the given array of messages.
*/
@Override
public synchronized void setFlags(Message[] msgs, Flags flag, boolean value)
throws MessagingException {
checkOpened();
checkFlags(flag); // validate flags
if (msgs.length == 0) // boundary condition
return;
synchronized(messageCacheLock) {
try {
IMAPProtocol p = getProtocol();
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
"Messages have been removed");
p.storeFlags(ms, flag, value);
} catch (ConnectionException cex) {
throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
throw new MessagingException(pex.getMessage(), pex);
}
}
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Set the specified flags for the given array of messages.
*/
@Override
public synchronized void setFlags(Message[] msgs, Flags flag, boolean value)
throws MessagingException {
checkOpened();
checkFlags(flag); // validate flags
if (msgs.length == 0) // boundary condition
return;
synchronized(messageCacheLock) {
try {
IMAPProtocol p = getProtocol();
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
"Messages have been removed");
p.storeFlags(ms, flag, value);
} catch (ConnectionException cex) {
throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
throw new MessagingException(pex.getMessage(), pex);
}
}
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Set the specified flags for the given array of messages.
*/
@Override
public synchronized void setFlags(Message[] msgs, Flags flag, boolean value)
throws MessagingException {
checkOpened();
checkFlags(flag); // validate flags
if (msgs.length == 0) // boundary condition
return;
synchronized(messageCacheLock) {
try {
IMAPProtocol p = getProtocol();
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
"Messages have been removed");
p.storeFlags(ms, flag, value);
} catch (ConnectionException cex) {
throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
throw new MessagingException(pex.getMessage(), pex);
}
}
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Set the specified flags for the given array of messages.
*/
@Override
public synchronized void setFlags(Message[] msgs, Flags flag, boolean value)
throws MessagingException {
checkOpened();
checkFlags(flag); // validate flags
if (msgs.length == 0) // boundary condition
return;
synchronized(messageCacheLock) {
try {
IMAPProtocol p = getProtocol();
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
"Messages have been removed");
p.storeFlags(ms, flag, value);
} catch (ConnectionException cex) {
throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
throw new MessagingException(pex.getMessage(), pex);
}
}
}
代码示例来源:origin: com.sun.mail/jakarta.mail
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
代码示例来源:origin: com.sun.mail/android-mail
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
代码示例来源:origin: org.glassfish.metro/webservices-extra
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
代码示例来源:origin: jboss/jboss-javaee-specs
MessageSet[] ms = Utility.toMessageSetSorted(msgs, null);
if (ms == null)
throw new MessageRemovedException(
内容来源于网络,如有侵权,请联系作者删除!